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:{{user}}- Current array element{{i}}- Current index (0-based)
Count Mode
Run a fixed number of times:While Mode
Loop while a condition is true: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:process_user:
Performance Considerations
- Use
concurrent: truefor independent operations - Set reasonable
maxfor while loops to prevent runaway execution - Batch operations when possible instead of individual API calls
- Limit iterations - very large loops can impact performance
Related
- Parallel Node - Run fixed branches concurrently
- Transform Node - Process array data with pipes