Skip to main content
The ConditionalNode class branches workflow execution based on a single condition, routing to one set of nodes when the condition is true and another when it is false.

Constructor

Parameters

Supported Operators

The operator field accepts exactly these 10 values:
Only these 10 operators are supported. Using any other string will raise a ValidationError at workflow build time.

Basic Examples

Simple True/False Branch

Numeric Threshold

String Prefix/Suffix Check

Empty Value Guard

Chaining Conditions (AND / OR Logic)

The ConditionalNode evaluates a single condition. Chain multiple nodes together to build AND / OR logic.

AND Logic — chain nodes

OR Logic — multiple conditions pointing to the same branch

Per-Node Condition (Conditional Execution)

Every node type supports .with_condition() to skip execution unless a condition is met:

Retry Configuration

Use .with_retry() to enable retries on the conditional node itself:

YAML Configuration

Complete Example