If
Routes items to different outputs based on conditions.
Overview
The If node evaluates conditions for each item and routes it to either the true or false output. Use it to:
- Branch workflow logic based on data
- Handle different cases differently
- Create conditional processing paths
Parameters
| Parameter | Description | Required |
|---|---|---|
| Conditions | List of conditions to evaluate | Yes |
| Combine Operation | How to combine multiple conditions | Yes |
| Convert Types | Auto-convert values before comparison | No |
| Ignore Case | Case-insensitive string comparisons | No |
Conditions
Each condition specifies:
| Property | Description |
|---|---|
| Field 1 | Left side of comparison (supports expressions) |
| Operation | Comparison operator |
| Field 2 | Right side of comparison (for binary operations) |
Comparison Operations
| Operation | Description | Needs Field 2 |
|---|---|---|
| Equals | Values are equal | Yes |
| Not Equals | Values are different | Yes |
| Greater Than | Field 1 > Field 2 | Yes |
| Greater Than or Equal | Field 1 >= Field 2 | Yes |
| Less Than | Field 1 < Field 2 | Yes |
| Less Than or Equal | Field 1 <= Field 2 | Yes |
| Contains | Field 1 contains Field 2 (strings) | Yes |
| Not Contains | Field 1 doesn't contain Field 2 | Yes |
| Starts With | Field 1 starts with Field 2 | Yes |
| Ends With | Field 1 ends with Field 2 | Yes |
| Regex | Field 1 matches regex pattern | Yes |
| Is Set | Value exists (not null/undefined) | No |
| Is Not Set | Value is null/undefined | No |
| Is Empty | Value is empty (string, array, object) | No |
| Is Not Empty | Value is not empty | No |
Combine Operation
| Option | Behavior |
|---|---|
| AND | All conditions must be true |
| OR | At least one condition must be true |
Outputs
| Output | Items Routed |
|---|---|
| true | Items where conditions evaluated to true |
| false | Items where conditions evaluated to false |
Examples
Simple Status Check
Route by status:
- Condition:
{{\$item.data.status}}Equalsactive
[Input] → [If: status = active] → true: [Process Active]
→ false: [Process Inactive]
Numeric Comparison
Route high-value orders:
- Condition:
{{\$item.data.amount}}Greater Than1000
Multiple Conditions (AND)
Route items meeting all criteria:
- Combine: AND
- Condition 1:
{{\$item.data.status}}Equalsapproved - Condition 2:
{{\$item.data.amount}}Greater Than0
Multiple Conditions (OR)
Route items meeting any criteria:
- Combine: OR
- Condition 1:
{{\$item.data.priority}}Equalshigh - Condition 2:
{{\$item.data.urgent}}Equalstrue
Check if Field Exists
- Condition:
{{\$item.data.email}}Is Set
String Contains
- Condition:
{{\$item.data.description}}Containsurgent - Ignore Case: enabled
Regex Match
Validate email format:
- Condition:
{{\$item.data.email}}Regex^[^@]+@[^@]+\.[^@]+$
Tips
- Each item goes to exactly one output (true or false)
- Use expressions in Field 1 for dynamic comparisons
- Enable "Convert Types" to compare numbers stored as strings
- Enable "Ignore Case" for case-insensitive string comparisons
- Connect both outputs to handle all items
- Unconnected outputs discard items silently