Condition

The Condition node branches the workflow based on an if/else expression. Routes to the true or false path depending on the result.

The Condition node branches the workflow based on an if/else expression. Routes to the true or false path depending on the result.

Overview

PropertyValue
Inputs1
Outputs2 (true, false)
OutputPasses through input to the chosen branch

Parameters

ParameterTypeDescription
labelstringNode identifier (camelCase)
conditionexpressionJavaScript-like expression (e.g. $input.text.length > 0)

Edge Handles

  • Source handle true – when condition evaluates to truthy
  • Source handle false – when condition evaluates to falsy

Expression Operators

Supports: ==, !=, >, <, >=, <=, &&, ||, .length, .contains(), etc. See Expression DSL.

Example

{
  "type": "condition",
  "data": {
    "label": "checkInput",
    "condition": "$userInput.body.text.length > 0"
  }
}

Connect edges with sourceHandle: "true" or sourceHandle: "false" to route to different branches.