StableWorkflow node
Repeat for each
Overview
Runs the steps on its Each path once per item of a list, then continues on the Done path.
Purpose
Process many records: email every overdue invoice, create a task per checklist item, update each line of an order.
Inputs
- For each item in — a list, usually the result of a Find records step (
Action results › records), an API response array or event data. - At most — maximum number of items to process (1–500, default 100).
Configuration
- Connect the per-item steps to the Each handle and the follow-up steps to Done.
- Steps inside the loop run sequentially for each item; emails and API calls therefore take time proportional to the list size.
- In an app plan,
{ "type": "run_workflow", "workflow": "…", "forEach": "{{results.due}}", "input": { "id": "{{event.item.id}}" } }compiles to this step with a Run workflow action on its Each path — the usual shape of a scheduled batch (one sub-run per item, each with its own Run history entry).
Outputs
- Inside the loop the current item is
Event › item/{{event.item}}— for records{{event.item.email}},{{event.item.id}}. - Step output
{ iterations }.
Example
Remind every overdue invoice
Example
Database › Find records Invoices (Max 200) → save as invoices
Repeat for each Action results › invoices (At most 200)
Each → If / else: {{event.item.status}} is “overdue”
Yes → Send email To: {{event.item.customer_email}} Subject: Invoice {{event.item.number}} is overdue
Done → Notification “Reminders sent”Errors
- If a step inside fails, the whole run fails at that item (later items are not processed).
Limitations
- Items beyond At most are ignored silently.
- The total number of executed steps per run is capped at 200 — a loop of 100 items with 3 steps each exceeds it (“Too many steps (possible loop)”).
Advanced
- Config:
{ items: Binding, max? }. Edges from the node carrybranch: "each"or"done"; the executor setsscope.event.itemper iteration, walks theeachedges, then thedone(and unlabelled) edges. The public demo sandbox (src/showcase/sandbox.ts) runs loops the same way.