Inputs
Outputs
None. The If block decides which downstream path runs. It does not expose a data output of its own. To use data, reference the outputs from the blocks you place on each path, not from If itself. For example, a record updated on the true path is available downstream as{{ steps.update_record.record_id }}.
Behavior
The If block checks its conditions once, the moment the run reaches it. After that it commits to a single path for the rest of that run. The true path runs when every condition in the group is satisfied. The false path runs whenever even one condition is not met. This includes the case where an input is empty or has no value at all. Only one path ever runs per execution. Each path is independent. You can connect blocks to the true path, the false path, both, or neither. A path with no blocks connected simply ends the run quietly when it is taken. That is a valid way to stop on the false branch. By default, the two paths never rejoin. So a block that runs only on the true path produces an output that does not exist on the false path. To learn how to pass data between branches, see Variables & data passing.Gotchas
- The false path runs on empty input, not just on a logical “no”. A condition such as
Owner is jane@acme.comfails in two cases. It fails when the owner is someone else, and it fails when the record has no owner at all. If a missing value should take a different route, add an explicit “is not empty” condition first. - More than two outcomes belong in Switch, not nested If blocks. Chaining several If blocks to handle three or more cases is hard to read in run history and easy to misorder. Use Switch for ordered multi-case routing instead.
- Downstream blocks see only their own branch’s outputs. A block on the false path cannot reference an output produced on the true path, because that block never ran. Compute any shared value before the If block so both paths can read it.
- Legacy workflows called this block If/else. If you are migrating, the new engine renames it to If. The routing behavior is unchanged. See Migrate legacy workflows.
Examples
Routing a deal by amount
Send large deals to a Slack alert and let smaller deals continue silently.
A deal worth
75000 takes the true path and posts to #big-deals. A deal worth 12000 takes the false path, and the run ends without an alert.
Splitting traffic for an A/B test
Pair the If block with a random number to assign records to two variants in roughly equal shares.
A record that draws
0.81 is tagged Variant A. A record that draws 0.22 is tagged Variant B. Over many runs, this gives an even split.
Guarding against a missing email
Branch on whether a contact has an email before enrolling them in a sequence.
A contact with
priya@acme.com is enrolled in Outbound welcome. A contact with no email instead creates a follow-up task for the owner, so no run silently does nothing.