Skip to main content
The loop node iterates over data, executing a set of nodes for each iteration. It supports three modes: iterating over arrays, running a fixed count, or looping while a condition is true.

Configuration

Config Fields

* Must specify exactly one of: items, count, or while ** Required when using while mode

Loop Modes

Items Mode

Iterate over an array:
Inside the loop, access:
  • {{user}} - Current array element
  • {{i}} - Current index (0-based)

Count Mode

Run a fixed number of times:
Count can be a template:

While Mode

Loop while a condition is true:
The max field is required to prevent infinite loops.

Output

Context Variables

During each iteration, these variables are available:

Example Access

Examples

Process Array Items

Concurrent Processing

Process items in parallel for better performance:

Pagination Loop

Fetch all pages from a paginated API:

Retry Pattern

Retry a request up to 3 times:

Accessing Loop Results

After the loop, access results by index:

Nested Data Access

When iterating over objects with nested data:
Inside process_user:

Performance Considerations

  1. Use concurrent: true for independent operations
  2. Set reasonable max for while loops to prevent runaway execution
  3. Batch operations when possible instead of individual API calls
  4. Limit iterations - very large loops can impact performance