Skip to main content

Control Flow

The if step evaluates a condition and executes either the then or else branch. It is how you model data-dependent logic in your workflows.

Basic If/Then

If the condition passes, the then steps run. If it fails, the step passes silently (no error).

If/Then/Else

Add an else block to handle the failure case:

Condition Format

The condition is a three-element array: [value_or_path, operator, expected_value].

Using State Variables

The first element refers to a variable in the state bag. The third element can be a literal or another state variable.

Using JSONPath on Results

Operators

Operator Examples

Nested If Steps

You can nest if steps inside then or else blocks:

Combining with Extract

A common pattern: extract a value, then branch based on it:

What’s Next?