Skip to Content

Loop node

The Loop node iterates over data or repeats actions. It appears in the Loops palette category with the description: “Iterate over data or repeat actions.”

When to use

  • Process each item in an array (e.g., iterate over query results)
  • Repeat an action until a condition is met
  • Execute a block of nodes a fixed number of times

Configuration

Click the Loop node to open its configuration panel.

Loop node configuration showing Loop Type selection, array variable, iteration settings, and max iterations
Loop node configuration showing Loop Type selection, array variable, iteration settings, and max iterations

Loop Type

Three loop modes, selected via toggle buttons:

ModeIconDescription
For EachIterate over each item in an array
WhileRepeat while a condition is true
Times×NRepeat a fixed number of times

For Each settings

SettingTypeDescription
Array VariableText field (supports {{variable}} placeholder)The array to iterate over
Reverse OrderToggleProcess items from last to first
Item VariableText field (default: item)Name for the current item in each iteration
Index VariableText field (default: index)Name for the current index (0-based)
Max IterationsNumber input (default: 100)Safety limit to prevent infinite loops

Advanced Options

Expandable section with additional controls for concurrency and error handling.

Edge significance

The Loop node has two output edges:

  • Loop Body → connects to the nodes that execute on each iteration
  • Done → connects to the node that runs after all iterations complete
💡

Connect the last node in your loop body back to the Loop node to create the iteration cycle. The “Done” edge fires when all iterations are complete.

Output

VariableDescription
itemCurrent item in the iteration (For Each mode)
indexCurrent iteration index
Loop resultsAggregated results from all iterations

Common patterns

  • Process query results — Connect a Query Table node → Loop (For Each over {{query_result.rows}}) → processing nodes.
  • Retry with backoff — Use a While loop with a condition checking success status.
  • Batch processing — Use Times loop with calculated batch count.