Condition
Category: Control
Node id: condition
Evaluates a condition on input data and routes to true/false branches
What it does
- 10 comparison operators (equals, contains, greater_than, etc.)
- Numeric and string comparison with type coercion
- Null/empty detection with is_empty and is_not_empty
- Boolean branching output for pipeline routing
Use cases
- Route patients to different care pathways based on risk score
- Branch pipeline logic based on FHIR resource type
- Filter records by threshold values
Runtime
- Performance tier:
fast
Input ports
| Name | Type | Required | Description |
|---|---|---|---|
field | any | Yes | Dynamic input field to evaluate (name set by 'field' config) |
context | any | No | Optional value carried across the gate untouched. Name it in pass_through to hand it to the taken branch, e.g. pass_through: {"message": "context"}. Exists so a gated node can receive data without an un-gated edge keeping it alive. |
Output ports
| Name | Type | Required | Description |
|---|---|---|---|
true | json | No | Branch taken when condition is satisfied — connect downstream nodes here for the true path |
false | json | No | Branch taken when condition is NOT satisfied — connect downstream nodes here for the false path |
condition_met | boolean | No | Top-level boolean — available on the merged input map of any downstream node for convenience |
success | boolean | No | Whether the evaluation completed without error |
Settings
Basic
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Field | field | string | Yes | Name of the input field to evaluate | ||
| Condition Type | condition_type | enum | No | equals | equals, not_equals, greater_than, less_than, greater_than_equals, less_than_equals, contains, not_contains, is_empty, is_not_empty | Type of comparison to perform |
| Compare Value | compare_value | any | No | Value to compare against (not required for is_empty/is_not_empty) |
Advanced
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Pass Through | pass_through | json | No | Inputs to copy onto the taken branch, as {target_name: input_key}. Lets a downstream node that is gated by this condition still receive data, e.g. {"message": "transcript"} hands the transcript to an agent-run node on the true branch. |
Errors
| Code | Description |
|---|---|
UNSUPPORTED_CONDITION | The specified condition_type is not recognized |
TYPE_MISMATCH | Cannot compare values of incompatible types for numeric operators |
Runtime notes
- Connect downstream nodes to the 'true' or 'false' output port — the executor skips nodes on the inactive branch.
- Only one of the two branch ports is active per execution; nodes connected to the inactive port are skipped entirely.
- condition_met is also available as a top-level key in the merged input map for nodes that need it directly.
- is_empty and is_not_empty do not require compare_value; all other condition types do.
See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.
¿Algo no está claro? Envíe sus comentarios sobre la documentación por correo electrónico..