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
Retry pattern
Retry pattern
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.
Multi-step collection
Multi-step collection
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.