core / condition / schema v1
If / Else
Branch the workflow based on a condition
Prerequisites
No connection prerequisite is declared for this node.
Parameters
| Parameter | Type | Description |
|---|---|---|
Choose a conditionoperator | select Required Default: | Choose a comparison family and then the exact rule. Custom formula is available under Advanced. The True branch runs when it passes; otherwise the False branch runs. Options: equals (equals), not equals (not_equals), contains (contains), not contains (not_contains), starts with (starts_with), ends with (ends_with), greater than (greater_than), less than (less_than), greater or equal (gte), less or equal (lte), is empty (is_empty), is not empty (is_not_empty), is true (is_true), is false (is_false), is a number (is_number), is text (not a number) (is_string), matches regex (regex), is one of (in), is not one of (not_in), has any of these roles (has_any_role), has all of these roles (has_all_roles), has none of these roles (has_no_role), Custom formula (expression) |
ConditionsconditionGroup | condition_group Conditionally required | The visual condition builder. Add conditions and combine them with AND/OR (one level of nested groups). The True branch runs when the whole tree evaluates to true.Field conditions{
"visible": {
"key": "operator",
"values": [
"group"
]
},
"required": {
"key": "operator",
"values": [
"group"
]
}
} |
Value to checkleftOperand | text Required Default: | Usually a variable from a previous step, like {{content}} for message text. For role checks, use a role ID list such as {{member_roles}}.Field conditions{
"visible": {
"key": "operator",
"values": [
"equals",
"not_equals",
"contains",
"not_contains",
"starts_with",
"ends_with",
"greater_than",
"less_than",
"gte",
"lte",
"is_empty",
"is_not_empty",
"is_true",
"is_false",
"is_number",
"is_string",
"regex",
"in",
"not_in",
"has_any_role",
"has_all_roles",
"has_no_role"
]
}
} |
Compare withrightOperand | text Conditionally required | Use fixed text, a number, or another variable.Field conditions{
"visible": {
"key": "operator",
"values": [
"equals",
"not_equals",
"contains",
"not_contains",
"starts_with",
"ends_with",
"greater_than",
"less_than",
"gte",
"lte",
"regex"
]
},
"required": {
"key": "operator",
"values": [
"equals",
"not_equals",
"contains",
"not_contains",
"starts_with",
"ends_with",
"greater_than",
"less_than",
"gte",
"lte",
"regex"
]
}
} |
Compare with any ofrightValues | tags Conditionally required | Add the allowed values or the role IDs to look for.Field conditions{
"visible": {
"key": "operator",
"values": [
"in",
"not_in",
"has_any_role",
"has_all_roles",
"has_no_role"
]
},
"required": {
"key": "operator",
"values": [
"in",
"not_in",
"has_any_role",
"has_all_roles",
"has_no_role"
]
}
} |
Formulaexpression | textarea Required | A yes/no formula. Reference data with {{name}} or bare names; supports + - * / , comparisons, && || !, in, and functions like length(), includes(), round().Field conditions{
"visible": {
"key": "operator",
"values": [
"expression"
]
}
} |
Case sensitivecaseSensitive | boolean Optional | On: "Hello" and "hello" are different values. Off: letter case is ignored when comparing.Field conditions{
"visible": {
"key": "operator",
"values": [
"equals",
"not_equals",
"contains",
"not_contains",
"starts_with",
"ends_with",
"greater_than",
"less_than",
"gte",
"lte",
"is_empty",
"is_not_empty",
"is_true",
"is_false",
"is_number",
"is_string",
"regex",
"in",
"not_in",
"has_any_role",
"has_all_roles",
"has_no_role",
"group"
]
}
} |
Inputs and outputs
Inputs
execute- Execute (input)
Outputs
true- True (output)false- False (output)
Output data schema
[
{
"key": "result",
"type": "boolean",
"label": "Result",
"description": "True when the condition passed (the True branch ran)"
}
]Examples and troubleshooting have not yet been reviewed for this contract.
Version and compatibility
This reference follows the current authoring contract. Existing workflows retain their saved node revisions.
Contract identifier
e9e2c8d614ba0c97d5799f079ff9517c4e7973589dbaff9db768d7a21a1c4555