Loop Open¶
Initializes a loop and outputs loop metadata plus up to five data channels to iterate over. It can operate as a for-loop (using start/step/end), a while-loop (using a boolean expression), or a combination of both, stopping when either the index range is exhausted or the condition evaluates to False.

Usage¶
Use this node to start a looped section of your workflow. Connect its LOOP output to the LOOP input of a Loop Close node. Provide start, step, end for for-loop style iteration, and/or a condition expression for while-loop style control. Pass any data you want to carry across iterations through the data and aux outputs into the corresponding inputs of the Loop Close node so they are preserved and updated each cycle.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| start | True | INT | Initial loop index. Used with step and end for for-loop behavior. | 1 |
| step | True | INT | Increment (positive or negative) applied to the index each iteration. Set to 0 to disable index progression (for pure while-loop). | 1 |
| end | True | INT | Terminal index used to determine completion for for-loop behavior. | 10 |
| condition | True | STRING | Boolean expression evaluated each iteration. The loop proceeds only if it evaluates to True. | index < 10 and finished == False |
| index_override | False | ANY | Manually set the current loop index for the next iteration (advanced control or manual reset). | 5 |
| data | False | ANY | Primary data payload to iterate and carry through the loop. | {'items': [1, 2, 3]} |
| aux | False | ANY | Auxiliary data payload to iterate and carry through the loop. | working buffer |
| aux2 | False | ANY | Additional auxiliary data channel. | [0.1, 0.2] |
| aux3 | False | ANY | Additional auxiliary data channel. | {'state': 'init'} |
| aux4 | False | ANY | Additional auxiliary data channel. | meta info |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| LOOP | ANY | Loop metadata dictionary for the Loop Close node. Includes fields like id, index, start, step, end, finished, and internal references. | {'id': 12345, 'start': 1, 'end': 10, 'step': 1, 'index': 1, 'finished': False} |
| data | ANY | Passthrough of the primary data payload for use within the loop. | {'items': [1, 2, 3]} |
| aux | ANY | Passthrough of an auxiliary data payload for use within the loop. | working buffer |
| aux2 | ANY | Passthrough of an additional auxiliary data channel. | [0.1, 0.2] |
| aux3 | ANY | Passthrough of an additional auxiliary data channel. | {'state': 'iter-1'} |
| aux4 | ANY | Passthrough of an additional auxiliary data channel. | meta info |
Important Notes¶
- The node supports for-loop behavior (start/step/end), while-loop behavior (condition only, set step to 0), or a combined mode where either stopping condition ends the loop.
- If the condition evaluates to False at Loop Open, downstream execution is blocked for that iteration. Ensure your condition is valid and evaluates as expected.
- Use index_override to jump the index to a specific value for the next iteration. If not provided, the index starts from start and advances by step.
- The LOOP output is a metadata dictionary intended to be fed into Loop Close. Do not treat it as user data.
- To preserve and update data across iterations, connect the data/aux outputs of Loop Open to the corresponding inputs of Loop Close.
Troubleshooting¶
- Condition never becomes True: Verify the condition string and any variables you reference (e.g., index, start, end, finished). Ensure it evaluates to a boolean.
- Loop stops immediately: Check for off-by-one or sign issues. For positive step, end should be greater than start; for negative step, end should be less than start.
- No iteration progress with step 0: This is expected in while-loop mode; ensure your condition changes over time to avoid infinite looping.
- Data not preserved across iterations: Ensure the data and aux outputs from Loop Open are connected to the corresponding inputs on Loop Close.
- Unexpected index jumps: If using index_override, confirm the value you pass is within expected bounds and that you only set it when intended.