Looping, Branching & Logic Nodes
Early workflows ran top to bottom: step 1, step 2, step 3, done. Modern workflows can loop over lists, branch on conditions, and limit how much data flows through — the same building blocks you'd expect from a dedicated automation tool.
Loop over a list (iteration)
A loop runs a step — or a whole branch of steps — once for each item in a list. Point it at an array (rows from a sheet, files in a folder, results from a search) and it processes every item without you copying nodes.
- Each pass can read the current item and its position in the list
- Choose sequential (one at a time, in order) or parallel (several at once for speed)
- Results are collected back into a single list you can use in later steps
Loops are bounded by your plan's per-loop iteration cap — an oversized list fails the run with an upgrade notice rather than silently dropping items.
Branch on a value (switch)
A switch node routes execution down different paths based on a value. Think "if the category is refund go here; if complaint go there; otherwise take the default." Each branch can run completely different steps.
Cap the flow (limit)
A limit node caps how many items continue past it — handy after a loop or a large fetch when you only want the first N to move on (the top 10 results, the first 5 files).
Putting them together
A common shape: fetch a list → loop over each item → switch on a property inside the loop → limit the results that move on → summarize. Branching and looping compose freely, so you can model real decision logic instead of a single straight pipeline.
Where to go next
The values that drive these decisions usually come from earlier steps, from the person running the workflow, or from memory that survives between runs. See Expressions, Run Inputs & the Data Store for how to reference and compute those values.