# Loops: repeat steps for every item in a list

**Category:** [Orchestration](https://help.totalctrl.app/hc/totalctrl/totalctrl-help-center/en-US/categories/orchestration)
**Updated:** 2026-08-19

## Iterate over a list

A **loop** (iterator) runs its inner steps once for each element of a list. Point the loop at a **source** — usually a variable that holds an array, such as the line items on an order or the rows returned by an earlier step.
### Referencing the current item

Inside the loop, use:

- `{{loop.item}}` — the current element.
- `{{loop.index}}` — its position in the list, starting at 0.

If the items are objects, reach into their fields, e.g. `{{loop.item.sku}}` or `{{loop.item.email}}`.
### Example

For each line item on a new order, create a row in a Google Sheet:

- Loop source: `{{trigger.line_items}}`
- Inside the loop: **Google Sheets → Add row** with `{{loop.item.name}}` and `{{loop.item.quantity}}`.

### Aggregating results

A loop can optionally **aggregate** a value from each iteration into a single list you can use after the loop finishes.
### Limits

To protect against runaway runs, a single loop processes up to **1,000** items.

---

## Related Articles

- [Delays: pause a workflow for minutes, hours, or days](https://help.totalctrl.app/en-US/articles/flow-control-delays)
- [Orchestration Overview](https://help.totalctrl.app/en-US/articles/orchestration-overview)
- [Connect an app](https://help.totalctrl.app/en-US/articles/connect-an-app-1)
- [Build your first workflow](https://help.totalctrl.app/en-US/articles/build-your-first-workflow)
- [Filters: stop a run when conditions aren't met](https://help.totalctrl.app/en-US/articles/flow-control-filters)

---
[← Back to TotalCtrl Help Center](https://help.totalctrl.app/en-US/)