Conditional

A guide to using the Conditional node to create different execution paths (If/Else) in your workflow based on specific criteria.

The Conditional Node is a fundamental control structure that allows you to add branching logic to your workflow. It functions like an "If/Else" statement in programming, directing the workflow down one of two paths—true or false—based on whether a condition you define is met.

This is essential for creating dynamic workflows that can react differently to various inputs.

Configuration

You configure the node by setting up a condition that compares an input value to a target value.

Input Parameters

Parameter
Type
Description

Input Value

Text

The data you want to check. This is typically a variable from a previous node (e.g., {{llm_node.category}} or {{api_node.status_code}}).

Condition

Dropdown

The type of comparison to perform.

Target Value

Text

The value to compare against the Input Value.

Available Conditions

You have a wide range of conditions to choose from:

  • Text: equals, does not equal, contains, does not contain, starts with, ends with, is empty, is not empty.

  • Numeric: equal to, not equal to, greater than, less than, greater than or equal to, less than or equal to.

  • Boolean: is true, is false.

  • General: exists, does not exist.

Execution Paths

After the Conditional Node, the workflow will split into two branches:

  1. true Path: If the condition evaluates to true, the workflow will proceed down this branch.

  2. false Path: If the condition evaluates to false, the workflow will follow this branch instead.

You can then add different nodes to each path to handle the two different outcomes.

Example

Imagine you have a previous "Extract Structured Data" node that extracts a category from an email. You want to handle "Urgent" emails differently.

  • Input Value: {{extract_data_node.category}}

  • Condition: equals

  • Target Value: Urgent

If the extracted category is exactly "Urgent", the workflow will follow the true path, where you might have a "Send Slack Notification" node. For all other categories, it will follow the false path, where you might have a "Create Support Ticket" node.

Last updated

Was this helpful?