Loop Over Items — Run the next steps once per item — runs a path of steps for each item, one at a time or in batches, then carries on. Use it when a service must be called one item at a time, or when several steps belong together for each item.
Who can do this
Workspace Admins and Editors, on every plan.
Steps
Select + where the loop should start. In the step picker, open Logic and select Loop Over Items.
The loop has two ways out: Once per item (Add the steps to repeat) and Done. A dashed line returns from the end of what it repeats back to the loop. Steps that followed now hang off Done.
Optional: in Items from, name a list to go through — A list on each item to go through, one entry at a time — rows from a query, say. Empty: the items that came in. For example
rows, or{{ steps.query.rows }}.In Batch size, set how many go through at a time — it starts at 1. One at a time is slowest but safest. Raise it only if the service allows it.
Select + under Once per item and add the steps to repeat.
Add what should happen afterwards under Done.
While a test runs, the loop's card shows how far it is — 3 of 12.
Output
Down Done: every item that reached the end of the repeated path, from every turn — or the items as they came, if nothing is repeated.
Good to know
- Batch size is 1 to 1,000. With a batch of 10, each turn's steps get 10 items.
- A Wait cannot go inside a loop. A Wait cannot run inside Loop Over Items. Move it after the loop.
- A Merge cannot gather what a loop repeats.
- Removing the loop removes the steps it repeats, after asking; what came after it stays.
- One turn of a run takes at most 10,000 steps, loops included.
If something goes wrong
| What the run says | Why | What to do |
|---|---|---|
| …: there is no “rows” on the items that reached it, so there is nothing to go through. | Items from names a field the items do not have. | Check the name on the loop's Input tab. |
| …: “rows” is not a list, so there is nothing to go through one at a time. | The field is not a list. | Point at a field that holds a list. |
| More than 10,000 steps ran in one go, so the run was stopped. Look for a loop over far more items than expected. | The loop ran too many steps. | Filter the items first, or raise Batch size. |
| Needs setup on a Wait: a Wait cannot run inside Loop Over Items. Move it after the loop. | A Wait is on the repeated path. | Move it under Done. |