Skip to content

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.
Preview

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

FieldRequiredTypeDescriptionExample
startTrueINTInitial loop index. Used with step and end for for-loop behavior.1
stepTrueINTIncrement (positive or negative) applied to the index each iteration. Set to 0 to disable index progression (for pure while-loop).1
endTrueINTTerminal index used to determine completion for for-loop behavior.10
conditionTrueSTRINGBoolean expression evaluated each iteration. The loop proceeds only if it evaluates to True.index < 10 and finished == False
index_overrideFalseANYManually set the current loop index for the next iteration (advanced control or manual reset).5
dataFalseANYPrimary data payload to iterate and carry through the loop.{'items': [1, 2, 3]}
auxFalseANYAuxiliary data payload to iterate and carry through the loop.working buffer
aux2FalseANYAdditional auxiliary data channel.[0.1, 0.2]
aux3FalseANYAdditional auxiliary data channel.{'state': 'init'}
aux4FalseANYAdditional auxiliary data channel.meta info

Outputs

FieldTypeDescriptionExample
LOOPANYLoop 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}
dataANYPassthrough of the primary data payload for use within the loop.{'items': [1, 2, 3]}
auxANYPassthrough of an auxiliary data payload for use within the loop.working buffer
aux2ANYPassthrough of an additional auxiliary data channel.[0.1, 0.2]
aux3ANYPassthrough of an additional auxiliary data channel.{'state': 'iter-1'}
aux4ANYPassthrough 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.