Loops
What this page is — loop containers in the workflow builder: the three loop types, where a
loop gets its rounds from, the {{loop.…}} values available inside it, the per-round modifiers
for dates and numbers, the rules for steps inside a loop, and what deleting a loop does.
What it is for — doing the same piece of work several times in one run: one post per day for a week, one description per selected product line, one event per session.
The problem it solves — without a loop you either run the workflow seven times, re-typing the form each time, or build seven near-identical steps that drift apart as people edit them. A loop keeps one copy of the steps and runs it once per round, with the round's own date, number or item filled in. The cost of that convenience is that every AI step inside is charged once per round — a loop is the easiest way to multiply a bill by mistake.
Route: /org/ai-workflow-build → a workflow → Add Loop Container ·
Permission to add or change loops: Change your organisation's workflows: input form, steps, wiring, conditions and loops.
1. Anatomy of a loop
A loop is a container in the step list. It has its own settings and holds its own steps; the steps inside it run top to bottom, then start again for the next round, until every round is done. Then the workflow carries on with whatever follows the loop.
The loop's card shows its name, its type, and the value it repeats over, for example
{{loop.item}} ← {{inputs.days_count}}. The pencil icon (Edit Container) opens its settings;
the bin icon (Delete Container) deletes it. Below the header are its steps and an
Add Step to Loop button.
| Term | Meaning |
|---|---|
| Round | One pass through the loop's steps |
| Loop source | The input-form field that decides how many rounds there are and what each one is about |
| Loop value | What the current round is working on — available as {{loop.item}} |
| Modifier | A value calculated fresh each round, such as a date that moves forward one day |
2. Why you would use it
- One design, many outputs. Seven posts from one set of steps, all following the same rules.
- Dates that move by themselves. A modifier turns one start date into a schedule.
- The person running it decides the size. A number field or a multi-select in the form sets the number of rounds per run.
- Easier maintenance. Improve the step inside the loop once; every round benefits.
3. Adding and configuring a loop
Select Add Loop Container. A loop called New Loop is added and opened for editing. Its settings change as you type and are kept when you save the workflow.
| Setting | What to enter |
|---|---|
| Container Name | What the loop does, e.g. Write one post per day |
| Loop Type | Numeric Range (Count), Iterate over List (ForEach) or Multi-Select Options — section 4 |
| Loop Source (Global Input Key) | The input-form field the rounds come from. Only fields of the matching type are offered |
| Counter Variable | Leave it as item — see the note below |
| Start Value | Numeric Range only: the number the first round gets. Default 1 |
| Description | Optional notes for other builders |
| Variable Modifiers (Per Iteration) | Optional values recalculated each round — section 6 |
The current round's value is always available as {{loop.item}}. If you rename the counter, the
wiring selector offers {{loop. followed by your new name, but that value is not filled in when
the workflow runs and the input arrives empty. Keep the default item.
4. The three loop types
| Loop type | Loop source must be | Rounds | {{loop.item}} in each round |
|---|---|---|---|
| Numeric Range (Count) | A Number field | The number entered, e.g. 7 | Start Value, then +1 each round: 1, 2 … 7 |
| Multi-Select Options | A Multi Select field | One per option ticked | The ticked option's text |
| Iterate over List (ForEach) | A Loop Item (Internal) field | One per value | The value |
A Loop Item (Internal) field is hidden from the person running the workflow, and its values are not passed to the run, so a loop of this type stops at its first round with a failed to resolve loop source message. Use Multi-Select Options instead: add a Multi Select field with the values as its options, and say in the workflow's How to use text which ones to tick.
Limits that apply to every type: a loop must have at least one round — a number of 0 or a multi-select with nothing ticked stops the run — and at most 1,000 rounds.
5. Values available inside a loop
When you wire a step inside a loop, the selector adds a Loop Context group and a Current Loop Iteration group to the usual sources.
| Value | In round 1 | In round 3 | Use it for |
|---|---|---|---|
{{loop.item}} | The first value | The third value | What this round is about |
{{loop.index}} | 0 | 2 | Counting from zero, e.g. Event Index in a calendar-event step |
{{loop.iteration}} | 1 | 3 | Human-readable numbering: Day 3 |
{{loop.index_1}} | 1 | 3 | Same as iteration |
{{loop. + modifier name + }} | Initial value | Value after two steps | Dates or amounts that move each round |
{{loop.…}} values exist only inside the loop. Check reports Uses a {{loop…}} value outside a loop.
if a main-workflow step uses one.
Results of steps inside the loop. Step numbers restart at 1 inside a loop, and
{{steps.1.draft}} there means the current round's result from the loop's own step 1. Two
consequences:
- If the main workflow also has a step 1 that has already run, that main step is read instead. Place a loop whose steps pass results to each other at the start of the workflow.
- Steps after the loop cannot read results produced inside it. Save anything you need later from within the loop, for example with Save to Digital Asset.
6. Variable Modifiers (Per Iteration)
Add Modifier adds a row: Var Name, Initial Value (chosen like any wiring source, usually
an input-form field), Operation and Step. The result is available as {{loop. + name +
}}. In round n (counting the first round as 0):
| Operation | Calculates | Initial 100, Step 10 → rounds 1, 2, 3 |
|---|---|---|
| Add Number | Initial + n × Step | 100, 110, 120 |
| Multiply by | Initial × (1 + Step × n) | With Step 0.1: 100, 110, 120 — growth is not compounded |
| Add Days / Add Months / Add Years | Initial date moved n × Step units | 2026-11-02, 2026-11-03, 2026-11-04 with Add Days, Step 1 |
| Subtract Number | — | Currently stops the run. Use Add Number with a negative Step instead |
Date modifiers need a whole-number Step and an initial date written as 2026-11-02, a full date and
time, 11/02/2026 or 2026/11/02; the result is always YYYY-MM-DD.
7. Steps inside a loop
Add them with Add Step to Loop. A step inside a loop can be an AI Persona, Utility or External Tool step. Not allowed inside:
- Human Review — not offered, and Check blocks publishing if one ends up there. Review before the loop, see Human review steps.
- Another loop — loops cannot be nested.
Also inside a loop: the New persona shortcut is not available, steps switched off are skipped in every round, and a step's Conditions are not applied — the step runs in every round.
If any step fails in any round, the whole run pauses for error recovery. Retry starts the loop again from its first round, so rounds that had already succeeded run, and are charged, again.
8. Credits multiply per round
Each AI step inside a loop is charged once per round. A loop of 7 rounds with two AI steps makes 14 AI calls; a retry after a failure in round 6 makes them again from round 1. Utilities inside the loop cost nothing. Budget as rounds × AI steps, and see Credits and cost.
9. Field reference
| Field | Type | Required | Validation / source |
|---|---|---|---|
| Container Name | Text | Yes, in practice | Shown on the card and in the viewer |
| Loop Type | Choice | Yes | Three types, section 4 |
| Loop Source | Choice of input-form fields | Yes | Number, Multi Select or Loop Item (Internal) fields, matching the type |
| Counter Variable | Text | Yes | Keep item |
| Start Value | Number | No | Numeric Range only; default 1 |
| Description | Text | No | — |
| Modifier Var Name | Text | Per modifier | Letters, digits, underscores |
| Modifier Initial Value | Wiring source | Per modifier | A number or a date |
| Modifier Operation | Choice | Per modifier | Six operations, section 6 |
| Modifier Step | Number | Per modifier | Whole number for date operations |
| Steps inside | — | At least one to publish | A loop has no steps inside it. otherwise |
10. Deleting a loop
The bin icon asks Delete this loop? — The loop is removed and the steps inside it move to the main workflow. — with Delete loop to confirm.
For a loop that has already been saved, the deletion happens as soon as you confirm, not when you next save — and on a published workflow, new runs no longer include the loop. The moved steps exist only in your editor until you save, so save the workflow straight away to keep them.
11. Worked example
A social-media manager wants a week of Instagram posts booked into the content calendar from one form.
- Input form: Days (Number), First day (Date), Calendar (Calendar Picker), Campaign theme (Text).
- Loop: Numeric Range (Count), source Days, counter
item, start value 1. Modifierpost_date: Initial Value First day, Add Days, Step 1. - Inside, step 1, AI persona: writes the post for
{{inputs.campaign_theme}}, day{{loop.iteration}}. Output keypost. - Inside, step 2, Save AI-Generated Calendar Event: title
Instagram — Day {{loop.iteration}}, description{{steps.1.post}}, time{{loop.post_date}}, Event Index{{loop.index}}, calendar{{inputs.calendar}}. - The loop is the first item in the workflow, so
{{steps.1.post}}always means the loop's step 1.
With Days = 7 the run makes 7 AI calls and books 7 events on consecutive days, moving any that land on a non-working day.
12. Before this works
- The input form has a field of the type the loop needs — see Input form.
- For dates, the start date field is a Date or Date & Time field.
- The organisation has enough AI credits for rounds × AI steps.
- Editing needs Change your organisation's workflows: input form, steps, wiring, conditions and loops.
13. Don't confuse this with…
| The Loop tab on a step | The Loop / Variant Execution setting on an AI Persona or Utility step's Loop tab does not make the step repeat when the workflow runs. Use a loop container |
| Choosing a variant | Some Orbit workflows produce alternatives and ask you to pick one in the console. That is not a loop |
| Conditions | Decide whether a step runs, not how many times — see Conditions |
14. Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
| Loop Source offers nothing | The form has no field of the matching type. Add a Number or Multi Select field |
| The run stops with failed to resolve loop source | An Iterate over List loop, or a source field left empty. Switch to Multi-Select Options, or fill the field |
The run stops with loop count must be > 0 | The number was 0, or nothing was ticked |
An input built from {{loop.…}} arrives empty | The counter was renamed; use {{loop.item}} |
| The run stops with unknown operation | A Subtract Number modifier. Use Add Number with a negative Step |
| invalid date format or requires integer step | The modifier's initial date or Step is not in a form section 6 accepts |
An in-loop step got the wrong text from {{steps.N…}} | A main-workflow step with the same number ran earlier. Move the loop to the start of the workflow |
| A step after the loop gets nothing from inside it | Results inside a loop are not available afterwards. Save them inside the loop |
| Check says A loop has no steps inside it. | Add a step to the loop or delete it |
| The bill is much higher than expected | Rounds × AI steps, plus any retries. Reduce rounds or move AI work out of the loop |
More in AI workflow troubleshooting.