Skip to main content
Condition

Overview

The Condition node adds branching logic to your workflow. Based on data from previous nodes, route execution down different paths - like if-then-else statements in code, but visual and no-code.
Best for: Approval workflows, priority routing, data validation, multi-path automations, and decision logic.

How It Works

  1. Add multiple conditions (If, Else if, etc.)
  2. Each condition evaluates to true/false using Manual or Prompt AI mode
  3. By default, the first matching condition is executed
  4. Enable “Allow multiple conditions” to execute all matching paths
  5. Each condition gets its own output handle on the node

Configuration

Model Selection

Choose the AI model used for Prompt AI mode conditions. This only applies when using Prompt AI mode—Manual mode doesn’t use AI.

Condition Modes

Each individual condition can use one of two modes: Manual Mode Write expressions inside {{ }} brackets:
{{ trigger.output.amount > 1000 }}
{{ agent.output.sentiment === "negative" }}
{{ trigger.output.email.includes("@company.com") }}
Important: All manual expressions must be wrapped in {{}} brackets.
Prompt AI Mode Give natural language instructions for the AI to evaluate:
Determine if this customer message requires urgent attention based on:
- Keywords like "urgent", "emergency", "asap"
- Angry or frustrated tone
- Mention of high-priority issues

Context: {{trigger.output.message}}

Allow Multiple Conditions

Disabled (default): First match wins
  • Conditions evaluated in order (top to bottom)
  • Only the first matching condition executes
  • Other conditions are skipped
  • Most common use case
Enabled: All matching conditions execute
  • All conditions are evaluated
  • Every condition that returns true executes
  • Useful for triggering multiple parallel actions

Example Use Cases

Priority Routing (Manual Mode)

Condition 1: "If High Priority"
Mode: Manual
Expression: {{ agent.priority === "high" }}

Condition 2: "Else if Medium Priority"
Mode: Manual
Expression: {{ agent.priority === "medium" }}

Condition 3: "Else Low Priority"
Mode: Manual
Expression: {{ true }}

Customer Segmentation (Prompt AI Mode)

Condition 1: "If is already a customer"
Mode: Prompt AI
Instructions: Check if {{trigger.email}} exists in our customer database based on {{http_request.customers}}

Condition 2: "Else if is not a customer yet"
Mode: Prompt AI
Instructions: Determine if this is a new prospect

Amount Threshold (Manual Mode)

Condition 1: "If Needs Approval"
Mode: Manual
Expression: {{ trigger.amount >= 5000 }}

Condition 2: "Else Auto-Approve"
Mode: Manual
Expression: {{ trigger.amount < 5000 }}

Choosing Between Modes

Use Manual Mode When:

  • Logic is straightforward (checking values, comparing numbers)
  • You need predictable, consistent results
  • You want to minimize AI credit usage
  • Conditions are based on exact data matching

Use Prompt AI Mode When:

  • Logic requires understanding context or nuance
  • Evaluating natural language content
  • Making subjective judgments
  • Combining multiple factors that need interpretation
Example - When Manual is Better:
{{ trigger.amount > 1000 }}  ✅ Simple, clear, no AI needed

Manual Mode Operators

When writing manual expressions, you can use: Comparison: ===, !==, >, <, >=, <=
Logical: && (and), || (or), ! (not)
String Methods: .includes(), .startsWith(), .endsWith()
Existence: Check if value exists with {{ trigger.field }}
Examples:
{{ trigger.status === "approved" }}
{{ agent.score > 80 && agent.verified === true }}
{{ trigger.email.includes("@company.com") }}
{{ trigger.tags.includes("urgent") }}

Best Practices

Always add a final condition with {{ true }} to catch cases that don’t match other conditions.
Conditions are evaluated top to bottom. Put most specific conditions first, general ones last.
Name conditions clearly: “If High Priority” not “Condition 1”. This makes workflows easier to understand.
Use Manual for simple logic checks. Use Prompt AI for complex evaluations that need context analysis.

Next Steps