Run for Each Item
Run for each item is a setting on a step, not a step of its own. Bind it to a list and that step runs once per entry, leaving the canvas a straight line.
It covers the common case: send one email per customer, write one row per order, create one ticket per report. If the work takes more than one step per item, you need the Repeater step instead.
Setting it up
Open the step’s repeat badge
Click the step on the canvas and find the small badge on it — the one whose tooltip reads “Run this step once per item in a list”. It carries no label until you set it, and then shows what it is doing: Each item, or Pick a list if it still needs one.
Switch it to Each item
The default is Once, meaning the step runs a single time. Each item is the setting that makes it repeat.
Choose the list
Point it at a list an earlier step produced, such as {{ 3.result }}. Insert the reference from the data icon rather than typing it: the path depends on which step made the list.
Write the step’s fields against one item
Inside the step, {{ item }} is the entry being processed right now. A field that would have read {{ 3.result.0.email }} becomes {{ item.email }}.
Referring to the current item
| Reference | What it holds |
|---|---|
{{ item }} | The whole entry being processed |
{{ item.field }} | One property of it |
{{ item.$index }} | Position in the list, counting from 0 |
{{ item.$total }} | How many items there are altogether |
Both position tokens sit under item. Write {{ item.$index }}, not a bare {{ $index }} — that one is not recognised and passes through as literal text.
Filter uses a different form. Its
rules take {{ $item }} and {{ $itemIndex }}, with the dollar sign at the
front. Filter evaluates its rules itself rather than running a pass per item,
which is why the two look alike but are not interchangeable.
Watching it run
A step repeating over a list counts up on the canvas as it goes. Its badge reads 0/12 when the run starts and climbs, so a long fan-out reads as moving rather than stuck.
The badge counts runs of that step, one per item. Turning on the option that flattens each item’s output changes how many items there are, and the count follows it.
Not every step offers it
The badge is absent on steps where running once per item makes no sense:
- Flow control — Conditions, Switch, Filter. These already work through a list themselves.
- Steps that take their own inputs — Combine names the two lists it joins, and a Repeater already decides how many times its body runs.
- Steps that wait — Wait, Human Review. To pause between passes, put a Wait inside a Repeater body instead.
- Steps with no per-item work — Stop and Error, Do Nothing.
- Triggers, which start the run rather than doing work in it.
You cannot use it inside a Repeater
A step in a Repeater body already runs once per pass, so Each item is switched off for it. The canvas also refuses a connection that would close a loop around a step already set to repeat on its own.
Why: both answer the same question — how many times does this step run — and each has its own answer. A step set to Each item over 50 records, inside a Repeater running 50 passes, would run 2,500 times. That is almost never what anybody means, and an expensive thing to discover by running it.
Inside a Repeater body, leave the step alone: the Repeater is already driving the repetition, and {{ item }} works exactly the same way.
What it passes on
The step collects what every run produced, and the collection is itself a list. A later step reads it the same way it reads any other list, and can loop over it in turn.
| Reference | What it holds |
|---|---|
{{ N.results }} | Successful results only, in the order of your input list |
{{ N.items }} | Every item with its position, status and error |
{{ N.stats }} | total, succeeded, failed, skipped |
When two steps loop over the same list, use {{ N.item }} rather than
{{ N.results }}. It gives you what step N produced for the item being
processed right now, so “the record step 5 created for this same lead” stays
correct. See Variable
Syntax.
Limits
How long the list may be depends on your plan. A list longer than your tier’s ceiling is refused when the step fans out, with a message naming the limit. See System Limits for the figure on your plan, and for how many items may process at once.
Each item repeats the step’s work. Standard action steps consume 1 Step credit per item processed, while control steps are free. See Step Credits, Tokens & Storage for how repeated work and failed attempts are counted.
Where the list comes from somewhere you do not control, put a Filter or a Limit in front of it. A list that arrives ten times longer than expected then stops at a number you chose.
See System Limits for how many runs may happen at once on your plan.
Examples to copy
One email per customer
An earlier step returns {{ 2.ret.records }}. Set the email step’s repeat badge to Each item and point it at that list. Address it to {{ item.email }} and write the body with {{ item.name }}.
Number each row as you write it
Writing rows to a sheet, use {{ item.$index }} for a sequence number and {{ item.$total }} to write “3 of 47” into a status column.
What’s Next?
- Repeater — when the work takes more than one step per item.
- Loops & Iteration — the choice between the two, in one page.
- Variable Syntax — the full reference for
{{ }}.