Condition
Branch on a boolean expression — if / else.
About this Node
Evaluates a JMESPath expression against the node's scoped workflow state, compares the result against a threshold or literal value using a comparison operator (`<`, `<=`, `>`, `>=`, `==`, `!=`), and routes execution down either the `true` (port 1) or `false` (port 2) branch while automatically bypassing the unchosen path.
Ports & Branches
inPort 0Inbound execution flowtruePort 1Branch taken when the comparison evaluates to truefalsePort 2Branch taken when the comparison evaluates to falseHow this Node Reads Data
| Input | Access | Field | Example | Description |
|---|---|---|---|---|
| Evaluation Path | JMESPath | path |
classification.confidence |
JMESPath query evaluated against the node's incoming state (supports nested objects, array indexing, and JMESPath functions). |
State Keys Written (Outputs)
| Key Pattern | Type | Role | Description |
|---|---|---|---|
<scoped state passthrough> |
object |
Primary | Does not overwrite state keys; routes execution exclusively to either the `true` or `false` branch and forwards scoped state downstream. |
Tips & Best Practices
- Unchosen branches undergo dead-path elimination: downstream nodes reachable only from the inactive branch are automatically marked bypassed.
- For 3 or more discrete string branches, use the Router (`logic_switch`) node instead of chaining Conditions.
Commonly Paired With
Settings Parameters (3)
Configuration schema synchronized with the workflow catalog
| Field | Type | Default | Allowed Options | Description |
|---|---|---|---|---|
path |
string |
"" |
— | Context path to evaluate (JMESPath syntax) |
op |
string |
== |
<, <=, >, >=, ==, != | Comparison operator |
value |
string |
"" |
— | Value to compare against |
Confidence Threshold Gate
Auto-approve high-confidence AI classifications and route lower scores to a human Approval Gate.
Node Configuration
{
"Id": "logic_condition_1",
"Type": "logic_condition",
"Config": {
"path": "llm_output.confidence",
"op": "\u003E=",
"value": "0.85"
}
}Sample Input State
{
"llm_output": { "category": "billing", "confidence": 0.92 }
}Expected Output State
{
"_chosen_branch": "true"
}Tip: Numeric strings in `value` (like `0.85` or `200`) are automatically parsed as numbers when compared.
Check HTTP Status Success
Branch on an upstream HTTP Request node's secondary `_status` state key.
Node Configuration
{
"Id": "logic_condition_1",
"Type": "logic_condition",
"Config": {
"path": "api_response_status",
"op": "==",
"value": "200"
}
}Sample Input State
{
"api_response_status": 200,
"api_response": { "ok": true }
}Expected Output State
{
"_chosen_branch": "true"
}