Skip to main content

If / Else

Branches the workflow based on a condition. The node evaluates an expression and routes execution down either the true or false output port.

Properties

PropertyRequiredDescription
VariableYesThe value to evaluate. Supports expressions
OperationYesThe comparison to perform
Compare ValueConditionalThe value to compare against (not required for isEmpty, isTrue, isFalse)

Operations

OperationDescription
Is Equal ToPasses true if the variable strictly equals the compare value
Not Equal ToPasses true if the variable does not equal the compare value
ContainsPasses true if the variable contains the compare value as a substring
Is EmptyPasses true if the variable is null, undefined, or an empty string
Is TruePasses true if the variable is the boolean true or the string "true"
Is FalsePasses true if the variable is the boolean false or the string "false"

Output ports

PortWhen
trueThe condition evaluated to true
falseThe condition evaluated to false

Connect different nodes to each port to handle both outcomes. You may leave one port unconnected if you only need to act on one branch.

Example

Check whether an API response was successful:

  • Variable: {{ $nodes['HTTP Request'].statusCode }}
  • Operation: Is Equal To
  • Compare Value: 200

Nodes connected to true handle the success case; nodes connected to false handle failures.

You can also branch on execution status directly:

  • Variable: {{ $status['HTTP Request'].isSuccess }}
  • Operation: Is True