Control blocks decide which path a flow takes and how it handles waiting and failure. A block with several exits (for example true and false) leads to different blocks depending on what it decides. This page documents 11 blocks. For how flows work, see Flows and the flow editor. Values in settings can use templates such as {{ input.id }} and {{ steps.load.output.email }}; see Block reference overview.

Delay

Key: control.delay Waits before continuing. Long waits belong in a delayed job instead. Continues to: next

For each

Key: control.foreach Runs the each branch once per item, then follows done. Continues to: each, done (follow the one that applies)

If

Key: control.if Follows true or false depending on a condition. Continues to: true, false (follow the one that applies)

Merge objects

Key: control.merge Merges several objects into one (later keys win). Continues to: next

Do nothing

Key: control.noop Continues the flow without changing state or doing work. Continues to: next This block has no settings.

Retry

Key: control.retry Runs the attempt branch until it succeeds, with backoff. Continues to: attempt, next (follow the one that applies)

Set variables

Key: control.set Sets vars.<name> for later blocks. Continues to: next

Stop

Key: control.stop Ends the run without a response. Ends the run: nothing follows this block. This block has no settings.

Switch

Key: control.switch Follows the handle named by a value, or default. Continues to: *

Timeout

Key: control.timeout Runs an attempt branch with a deadline, then follows next or timeout. Continues to: attempt, next, timeout (follow the one that applies)

While

Key: control.while Runs the body branch while a condition is true, then follows done. Continues to: body, done (follow the one that applies)