Skip to content

If Condition

Overview

The If Condition node evaluates a boolean expression against the current workflow data and routes execution down one of two branches: true or false. Use it to split workflow logic based on dynamic values such as a model score, a status field, or a computed threshold. The expression supports dot-notation field access and common comparison operators. Both output ports always exist; only the matching branch continues execution.

Configuration

FieldTypeRequiredDescription
expressionstringYesBoolean expression evaluated against the workflow data context. Supports dot-notation field access (e.g. score.total >= 80), string equality (status == 'approved'), and logical operators (&&, `
inputPathstringNoJSONPath or dot-notation path to the data object the expression is evaluated against. Defaults to the root payload ($). Example: $.battle.result.
strictModebooleanNoWhen true, treats a missing or null field referenced in the expression as an evaluation error rather than coercing it to false. Defaults to false.
labelstringNoHuman-readable label shown on the node in the workflow studio canvas. Does not affect execution.

Inputs

PortTypeDescription
inputanyWorkflow data payload passed into the condition. The expression is evaluated against this value (or the sub-path defined by inputPath).

Outputs

PortTypeDescription
trueanyEmits the unmodified input payload when the expression evaluates to true. Connect downstream nodes that should run on the positive branch.
falseanyEmits the unmodified input payload when the expression evaluates to false. Connect downstream nodes that should run on the negative branch.
errorobjectEmits an error object when the expression cannot be evaluated (e.g. syntax error, missing field in strict mode). Contains message and expression fields.

Example

json
{
  "nodeType": "if_condition",
  "config": {
    "expression": "battle.winner_score >= 75 && battle.status == 'completed'",
    "inputPath": "$.payload",
    "strictMode": true,
    "label": "Score threshold check"
  }
}