Skip to content

Condition

Overview

The Condition node evaluates a boolean expression against the current execution context and routes the workflow to one of two branches: true or false. Use it to implement branching logic such as threshold checks, flag guards, or value comparisons without writing custom code. The expression is evaluated against the data payload available at that point in the workflow; if the expression throws or cannot be evaluated, execution is halted and an error is emitted. No credentials are required.

Configuration

FieldTypeRequiredDescription
expressionstringYesA boolean expression evaluated against the execution context. Supports dot-notation property access and standard comparison operators (e.g. data.score >= 0.8, context.votes.length > 0). Evaluated in a sandboxed environment — no side effects.
labelstringNoHuman-readable label displayed on the node in the workflow canvas. Does not affect evaluation.
strictbooleanNoWhen true, evaluation errors (e.g. missing property, type mismatch) route to the false branch instead of halting execution. Defaults to false (errors halt the workflow).
inputPathstringNoOptional dot-notation path to a sub-object of the incoming payload to use as the expression root. If omitted, the full payload is available as data.

Inputs

PortTypeDescription
inputobjectThe execution context payload passed from the previous node. Made available to the expression as data (or the sub-object at inputPath if configured).

Outputs

PortTypeDescription
trueobjectReceives the unmodified input payload when the expression evaluates to true.
falseobjectReceives the unmodified input payload when the expression evaluates to false, or when strict is true and evaluation throws.
errorobjectEmitted when the expression throws and strict is false. Payload includes message and expression fields describing the failure.

Example

json
{
  "nodeType": "condition",
  "config": {
    "expression": "data.judgeScore >= 0.75 && data.votesCount > 3",
    "label": "Score threshold check",
    "strict": false,
    "inputPath": "battleResult"
  }
}