If-Then
Overview
If-Then evaluates one or more conditions and routes flow to Then, Else, or Skip.
This node supports mixed data-type comparisons, OR grouping within condition sets, optional time-of-day gating, and optional skip behavior when the result has not changed since the previous run.
Input
Conditions
array requiredList of condition objects. At least one condition is required.
Each condition includes:
Name: optional label for readability.Or group: optional group key for OR logic.Compare Data Type: comparison mode selected from:- String (
string) - Number (
number) - Boolean (
boolean) - General Array (
array[*]) - String Array (
array[string]) - Number Array (
array[number])
- String (
First value to compareandSecond value to compare: values or references used in comparison.- Type-specific compare operator fields.
Condition logic behavior:
- Conditions in the same
Or groupare ORed (any truemakes group true). - Conditions without
Or groupare treated as separate implicit groups. - All groups are ANDed together (
all groups must be true).
This gives a flexible pattern: OR within groups, AND across groups.
Compare Data Type
stringControls which operator set is used:
- Number (
number): numeric comparisons (=,!=,<,<=,>,>=). - String (
string): text comparisons (equal/not-equal/contains/starts/ends/regex). - Boolean (
boolean): equal / not equal. - General Array (
array[*]): size-only comparisons. - String Array (
array[string]): contains/not-contains/string-array size checks. - Number Array (
array[number]): contains/not-contains/number-array size checks.
Compare Type Number
stringAvailable options for Number mode:
- Equal (
EQUAL): true when both values are numerically equal. - Not Equal (
NOT_EQUAL): true when values differ. - Less Than (
LESS_THAN): true when first value is smaller. - Less Than or Equal (
LESS_THAN_OR_EQUAL): true when first value is smaller or equal. - Greater Than (
GREATER_THAN): true when first value is larger. - Greater Than or Equal (
GREATER_THAN_OR_EQUAL): true when first value is larger or equal.
Compare Type String
stringAvailable options for String mode:
- Equal (
EQUAL): exact string match. - Not Equal (
NOT_EQUAL): exact mismatch. - Contains (
CONTAINS): first value includes second value as substring. - Not Contains (
NOT_CONTAINS): first value does not include second value. - Starts With (
STARTS_WITH): first value begins with second value. - Ends With (
ENDS_WITH): first value ends with second value. - Matches Regex (
MATCHES_REGEX): first value matches regex pattern in second value.
Compare Type Boolean
stringAvailable options for Boolean mode:
- Equal (
EQUAL): both booleans are the same. - Not Equal (
NOT_EQUAL): booleans differ.
Compare Type Array
stringArray compare options depend on array mode:
- General Array (
array[*]):- Size Equals (
SIZE_EQUAL) - Size Greater Than (
SIZE_GREATER_THAN) - Size Less Than (
SIZE_LESS_THAN)
- Size Equals (
- String Array (
array[string]):- Contains (
CONTAINS) - Not Contains (
NOT_CONTAINS) - Size Equals (
SIZE_EQUAL) - Size Greater Than (
SIZE_GREATER_THAN) - Size Less Than (
SIZE_LESS_THAN)
- Contains (
- Number Array (
array[number]):- Contains (
CONTAINS) - Not Contains (
NOT_CONTAINS) - Size Equals (
SIZE_EQUAL) - Size Greater Than (
SIZE_GREATER_THAN) - Size Less Than (
SIZE_LESS_THAN)
- Contains (
Numeric Comparison Inputs
numberFor number mode:
compareFirstValcompareSecondValcompareTypeNum
Runtime uses small floating-point tolerance for equality checks.
String Comparison Inputs
stringFor string mode:
compareFirstValcompareSecondValcompareTypeStr
When MATCHES_REGEX is selected, invalid regex patterns produce a warning and evaluate as false.
Boolean Comparison Inputs
booleanFor boolean mode:
compareFirstValcompareSecondValcompareTypeBool
General Array Comparison Inputs
For array[*] mode:
- first value must resolve to an array.
- second value is numeric target size.
- operator checks array size relation.
String Array Comparison Inputs
For array[string] mode:
- first value must be string array.
- Contains (
CONTAINS) / Not Contains (NOT_CONTAINS) expects second value as string. - size operators expect second value as number.
Number Array Comparison Inputs
For array[number] mode:
- first value must be number array.
- contains checks use numeric tolerance.
- size operators compare against numeric second value.
Skip until outcome changes
booleanWhen enabled, this node routes to Skip if current final result is the same as previous run result.
Behavior notes:
- First run does not skip.
- Later runs skip only when outcome unchanged.
Enable time of day ranges
booleanEnables additional time-window gating.
Final condition result becomes:
conditionsMet AND weekTimeRangesMet
Time of Day Ranges
objectRequired when time ranges are enabled.
Structure uses day keys (mon..sun) with one or more [start,end] time ranges per day.
Runtime behavior:
- Supports
HH:MMandHH:MM:SS. - Overnight ranges are supported (for example
23:00:00to02:00:00). 00:00:00to00:00:00is treated as full-day coverage.- Missing/invalid day structure restricts evaluation to false for time gate.
Output
Condition Result
booleanFinal combined result after condition evaluation and optional time-range gating.
Or Group Results
arrayPer-group result summary, each item containing:
orGroupresult
Branching
Then
Triggered when final result is true.
Else
Triggered when final result is false.
Skip
Triggered when Skip until outcome changes is enabled and outcome is unchanged from previous run.