Skip to content

Condition

Overview

The Condition node routes data to one of two outputs based on a boolean input. It acts as a switch, typically placed in a flow to handle logic branching.

Use Condition when:

  • You need to perform different actions based on a boolean check.
  • You want to separate valid data from invalid data for distinct processing.

💡 Tip

Use this node with a comparison node to build complex decision trees.

Inputs

NameTypeDescription
inputanyThe data to be routed.
conditionboolThe boolean value that determines routing.

Outputs

NameTypeDescription
thenanyPasses the input when the condition is true.
elseanyPasses the input when the condition is false.

Parameters

This node does not have any configuration parameters.

Example

Logical Branching

You want to send an image to an analysis node only if a sensor trigger is active, and log a warning otherwise.

Configuration:

  • This node has no configurable parameters.

Result: When the sensor trigger is true, the image is sent through the then output. When false, it goes through the else output.

Reference: