If
Branches workflow execution based on a boolean condition. The workflow takes the true path when the condition is met and the false path otherwise.
Use If when you need to make a binary decision:
- Did the HTTP request succeed? (status == 200)
- Is the user on the Pro plan?
- Does the payload contain a required field?
For more than two outcomes, use Switch instead.
| Handle | Type | Description |
|---|---|---|
input | any | The value to evaluate the condition against. |
| Handle | Type | Description |
|---|---|---|
true | control | Execution continues here when the condition is true. |
false | control | Execution continues here when the condition is false. |
Data from the If node's input is passed through to whichever branch executes. The downstream node on either branch receives the same value that was wired into input.
| Setting | Type | Description |
|---|---|---|
condition | expression | A boolean expression evaluated against input. Returns true or false. |
Write the condition as a Tensorify expression using {{ }} bindings:
{{ input.status }} == 200
{{ webhook.body.plan }} == "pro"
{{ http_request.data.active }} == true
Comparison operators: ==, !=, >, <, >=, <=
Logical operators: and, or, not
{{ input.status }} >= 200 and {{ input.status }} < 300
Check if an HTTP request succeeded before sending a notification:
Webhook → HTTP Request → If ({{ http_request.status }} == 200) → true: Send Email
→ false: Stop
- You do not need to connect both
trueandfalseoutputs. Leave a branch unconnected if you want execution to simply stop on that path. - If the condition references a variable that does not exist, it evaluates to
false. - String comparisons are case-sensitive:
"Pro"is not equal to"pro".
