Skip to main content
The Loop node repeats a section of the flow a configurable number of times. It maintains an internal counter and provides two exit paths: Continue to run the loop body, or Finish when the maximum iteration count is reached.

Behavior

  • On each entry, compares the internal counter to maxIterations
  • If the counter equals maxIterations, routes to Finish and resets the counter
  • Otherwise, increments the counter and routes to Continue

Configuration

Output handles

Connect the last node in the loop body back to the Loop node so the next iteration can run. Loop returns are never inferred automatically — every re-entry must be an explicit edge on the canvas.

Output variables

Reference in downstream nodes as nodes.{loopNodeId}.iteration or nodes.{loopNodeId}.finished.

Use cases

Loop up to 3 times around an API Call node. Wire Continue to the API call and Finish to an error handler after all retries are exhausted.
Loop to collect multiple data points from the caller (e.g., “Enter item 1… Enter item 2…”). Use {{nodes.{loopNodeId}.iteration}} in TTS text to indicate which item number.