Skip to main content

If

Type ID: core.if  ·  Kind: Action  ·  Ports: 1 in, 2 out (true, false)

Evaluates one or more conditions against input values and routes the result to one of two main outputs. Items satisfying the combined condition go to the first (true) output; everything else goes to the second (false) output.

Credentials​

None

Properties​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
ConditionsconditionsarrayYes{}A collection of condition rules, grouped by data type (see below)Always
CombinecombineOperationoptionsYesallall - true only if ALL conditions are met; any - true if ANY condition is metAlways

Conditions (nested fields)​

Each condition is defined under one of four data-type groups. Every group has value1, operation, and value2.

Boolean - value1 (boolean, default false), value2 (boolean, default false), operation:

ValueName
equalEqual
notEqualNot Equal

Date & Time - value1 (dateTime), value2 (dateTime), operation:

ValueName
afterOccurred After
beforeOccurred Before

Number - value1 (number, default 0), value2 (number, default 0), operation:

ValueName
smallerSmaller
smallerEqualSmaller or Equal
equalEqual
notEqualNot Equal
largerLarger
largerEqualLarger or Equal
isEmptyIs Empty
isNotEmptyIs Not Empty

String - value1 (string), value2 (string, also a Regex variant), operation:

ValueName
containsContains
notContainsNot Contains
endsWithEnds With
notEndsWithNot Ends With
equalEqual
notEqualNot Equal
regexRegex Match
notRegexRegex Not Match
startsWithStarts With
notStartsWithNot Starts With
isEmptyIs Empty
isNotEmptyIs Not Empty

Notes​

  • The matching branch receives a single item, { result: true } or { result: false }.
  • isEmpty/isNotEmpty treat undefined, null, '', NaN, invalid dates, and empty objects as empty.
  • Numeric operators coerce with Number(...), string operators with String(...); an unparseable date throws.
  • regex accepts either a bare pattern or a /pattern/flags form (flags: g i m u s y).