Loops, Merges, and Parallel Branches: Non-Linear Control Flow, Explained
Four step types — loop, merge, parallel, and switch — give Workflows real non-linear control flow, nested up to three levels deep.
Beyond simple if/else branching, Workflows has four dedicated step types for non-linear control flow: loop, merge, parallel, and switch. Here's what each one actually does.
Loop
A loop step runs a set of nested steps repeatedly — useful for anything that needs to happen once per item in a list, rather than once for the whole workflow.
Parallel
A parallel step splits into multiple branches that each hold their own nested steps, running independently of one another rather than in a single sequence. Each branch is configured on its own, with its own steps inside it.
Switch
A switch step evaluates a value and routes to one of several defined cases, each with its own nested steps — plus a fallback path for anything that doesn't match a defined case, so nothing falls through silently.
Merge
A merge step brings branches that split earlier back together into a single path, so the workflow can continue linearly again once parallel or conditional work is done.
The shape underneath all four
All four step types nest their own steps inside them, and all four are bound by the same limit: nesting is capped three levels deep. A loop inside a parallel branch inside a switch case is fine; going a level past that isn't supported. It's worth knowing this going in, rather than discovering the ceiling mid-build.
Together, these four cover the control-flow patterns a linear if/else branch can't — repetition, independent concurrent work, multi-way routing, and recombination — and they're the pieces to reach for once a workflow needs more than a straight line with one fork in it.