Loop Node

Iterate over an array and execute downstream nodes for each item.

How It Works

  1. Loop reads an array from context using Input Path
  2. For each item, it runs all downstream nodes
  3. Each iteration has the item available as {{itemVariable}}
  4. Results are collected in {{loop.results}}

Configuration

NameTypeRequiredDefaultDescription
inputPathstringYesDot-notation path to array in context, e.g. users.httpResponse.data
itemVariablestringYesName for the current item in each iteration, e.g. user, item, row
maxIterationsnumberNo100Safety limit for maximum iterations

Output

json
{
  "loop": {
    "count": 10,
    "successCount": 9,
    "errorCount": 1,
    "results": [ /* iteration outputs */ ],
    "skipped": 0
  }
}
KeyDescription
{{loop.count}}Total items processed
{{loop.successCount}}Successful iterations
{{loop.errorCount}}Failed iterations
{{loop.results}}Array of all iteration outputs
{{loop.skipped}}Items skipped (over max)

Example

Fetch users from an API → Loop → Send WhatsApp to each user:

Step 1: HTTP Request

text
GET /users → variableName: "users"

Step 2: Loop Configuration

text
Input Path: users.httpResponse.data
Item Variable: user

Step 3: WhatsApp (inside loop)

text
To: {{user.phone}}
Body: Hi {{user.name}}, your account is ready!
Each iteration runs independently. If one fails, the loop continues with the next item and records the error.