Skip to main content
The Loop node repeats the same actions for every item in a list. If you have 10 emails to process, it does the same thing 10 times - once for each email. Think of it like a factory assembly line: each item comes through, gets the same treatment, then moves on.
Loop node configuration form

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.
Workflow:

Example: Send Personalized Emails

Send individual emails to a list of recipients:
Accessing item properties:

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

This way, after the loop ends, you have a list of everything that happened.

Process Results with Code

Loops Inside Loops

Sometimes you need to loop through a list that’s inside another list:
Be careful with loops inside loops - the numbers multiply! 10 departments with 50 employees each = 500 total emails.

Conditional Processing

Skip items that don’t meet criteria:
The unmet branch doesn’t need to connect to anything.

Using Index and Position

First item handling:
Last item handling:
Using index for numbering:

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:
Then after the loop, check failures and alert if needed.

How Long Will It Take?

Items are processed one at a time. If you have 100 items and each takes 3 seconds, that’s 5 minutes total.
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

Create your results list before the loop starts. Use Update Variable to create an empty list [], then add to it inside the loop.
Use isFirst to send a “starting now” message, and isLast to send a “all done” message.
While building and testing, add a condition that only processes the first 3 items. Once everything works, remove that condition.

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.
After the loop finishes:
number
How many items were processed.

Condition

Filter items within loops.

Update Variable

Accumulate results across iterations.