
Loop configuration — point at an array of items and name the per-iteration variable.
When to Use
- Processing lists - Handle each email, each row in a spreadsheet, each file
- Sending to multiple people - Send personalized emails to everyone on a list
- Processing data - Do the same thing to every item
- Collecting results - Gather what you learned from each item
Example: Process Email Attachments
Extract and analyze each attachment from an email:1
Receive email with attachments
Use Event from App (Gmail) to trigger on emails with attachments.
2
Loop over attachments
Add a Loop node:
- Iterable data:
{{event_from_app_1.email.attachments}}
3
Process each attachment
Inside the loop:
- Read File (current attachment)
- Ask AI (analyze content)
- Update Variable (append results)
4
After loop
Send summary of all analyzed attachments.
Example: Send Personalized Emails
Send individual emails to a list of recipients:Example: Process Spreadsheet Rows
Handle each row from a Google Sheet:Collecting Results from Each Loop
If you want to remember what happened with each item:Save Results as You Go
Process Results with Code
Loops Inside Loops
Sometimes you need to loop through a list that’s inside another list:Conditional Processing
Skip items that don’t meet criteria:Using Index and Position
First item handling:Loop Completion
The nodes connected after the loop (not inside it) execute once after all iterations complete:Error Handling
By default, if one iteration fails, the loop continues with remaining items. To handle errors:How Long Will It Take?
If your loop is slow:- Some services let you send multiple items at once - check if yours does
- Test with just a few items first before running the full list
- Make sure your timeout is long enough
Tips
Settings
string
default:"Loop"
What to call this node (shown on the canvas).
string
default:"loop_1"
A short code to reference this node’s data.
string
required
The list to loop through. Examples:
{{http_request_1.body.items}}- items from a web request{{event_from_app_1.email.attachments}}- files attached to an email{{external_api_1.values}}- rows from a spreadsheet
Outputs
During each loop iteration:any
The item being processed right now.
number
Which number item this is (starts at 0, so the first item is 0, second is 1, etc.).
boolean
True if this is the first item.
boolean
True if this is the last item.
number
How many items there are in total.
number
How many items were processed.
Related Nodes
Condition
Filter items within loops.
Update Variable
Accumulate results across iterations.
