Intermediate30 minModule 3 of 6

Data Flow & Conditions

Master template variables to pass data between nodes and use conditions to branch workflow logic.

What you'll be able to do after this module

  • Write template variable expressions to reference any upstream node's output
  • Understand how the variable system resolves data at execution time
  • Build conditional branches that route execution based on runtime values
  • Apply the three core data passing patterns: linear chain, fan-out, and conditional routing

Template Variables

Template variables are how nodes communicate. When you type in an action's config field, you can reference the output of any upstream node using this syntax:

{{@nodeId:NodeLabel.field}}
PartMeaningExample
@nodeIdInternal ID of the source node@abc123
NodeLabelDisplay label of the source nodeGenerate Text
.fieldPath to a specific field in the output's data object.text, .email, .data.status

How to insert variables

  1. Click an action node to open the config panel
  2. Place your cursor in a template-enabled field (text input or textarea with the {{ }} icon)
  3. Type {{ — a dropdown appears showing all upstream nodes and their available output fields
  4. Select a node and field to insert the full reference

Examples

{{@trigger:Webhook.body.customer_id}}     → access webhook payload field
{{@node1:Scrape URL.markdown}}             → scraped page content
{{@node2:Generate Text.text}}              → AI-generated text
{{@node3:Get Customer.email}}              → nested field (auto-unwrapped from data)

Data resolution at runtime

When a step executes, the engine:

  1. Looks up the stored output for the referenced nodeId
  2. Automatically unwraps the standard { success, data, error } envelope — so .text actually accesses data.text
  3. Substitutes the resolved value into the config field before the action runs

If a referenced node hasn't executed yet (e.g., it's in a different branch), the variable resolves to undefined.


Data Passing Patterns

There are three fundamental patterns for wiring data through a workflow:

Pattern 1: Linear Chain

Each step reads from the step before it.

Trigger Scrape URL Generate Text Send Email
  • Generate Text reads {{@A:Scrape URL.markdown}}
  • Send Email reads {{@B:Generate Text.text}}

This is the most common pattern — a sequential pipeline.

Pattern 2: Fan-Out

Multiple steps read from the same upstream node.

Trigger Classify Ticket Send Slack Message Create Linear Ticket Send Email

Here, the classifier output is consumed by three different actions. All three run after Classify Ticket completes.

Pattern 3: Conditional Routing

A Condition node evaluates an expression and routes to one of two branches.

true false Trigger Score Lead Condition Send Slack Alert Create Ticket

The Condition checks whether the score meets a threshold. Only the matching branch executes.


The Condition Node

The Condition is a system action (no integration needed) that evaluates a boolean expression and routes execution to a true or false branch.

How to add a Condition

  1. Click + to add a new node
  2. Select Condition from System Actions
  3. Connect two outgoing edges from the Condition node — one for the true path, one for the false path

Writing Expressions

The expression field accepts template variables, literals, and operators:

Comparison operators:

OperatorMeaning
===Strict equality
!==Strict inequality
>Greater than
<Less than
>=Greater or equal
<=Less or equal

Logical operators:

OperatorMeaning
&&AND
||OR
!NOT

Value types:

TypeExample
Variable{{@node1:Score Lead.score}}
String literal"active", "high"
Number literal42, 3.14
Boolean literaltrue, false

Expression examples

// Simple comparison
{{@node1:Get Customer.status}} === "active"

// Numeric threshold
{{@node2:Score Lead.score}} > 80

// Compound logic
{{@node1:Get Customer.status}} === "active" && {{@node2:Score Lead.score}} > 50

// Negation
!{{@node3:Guard.detected}}

Branching behavior

  • The true edge connects to the actions that run when the expression evaluates to true
  • The false edge connects to the alternate path
  • Each branch can have any number of downstream steps
  • Only the matching branch executes — the other is skipped entirely

Practical Exercise: Priority Router

Build a workflow that classifies incoming support tickets and routes them based on priority.

true false Webhook Trigger AI Gateway: Generate TextClassify priority Conditionpriority === 'high' Slack: Send Message#support-urgent Linear: Create TicketNormal priority backlog

Create the workflow

New workflow → change trigger to Webhook.

Set the webhook schema to:

{
  "subject": "string",
  "body": "string",
  "customer_email": "string"
}

Add the classifier

Add AI Gateway → Generate Text.

  • Prompt: Classify this support ticket as "high" or "normal" priority. Reply with only the word "high" or "normal".\n\nSubject: {{@trigger:Webhook.subject}}\nBody: {{@trigger:Webhook.body}}
  • Format: text

Add the Condition

Add a Condition node.

  • Expression: {{@node1:Generate Text.text}} === "high"

Connect two outgoing edges: true path and false path.

Add the branches

True branch: Add Slack → Send Message

  • Channel: #support-urgent
  • Message: 🚨 High priority ticket from {{@trigger:Webhook.customer_email}}: {{@trigger:Webhook.subject}}

False branch: Add Linear → Create Ticket

  • Title: {{@trigger:Webhook.subject}}
  • Description: From: {{@trigger:Webhook.customer_email}}\n\n{{@trigger:Webhook.body}}
  • Priority: 3 (normal)

Test with mock data

Use the Mock Request field on the Webhook trigger to test without an actual HTTP call:

{
  "subject": "Cannot access dashboard",
  "body": "I'm locked out of my account and have a demo in 30 minutes",
  "customer_email": "[email protected]"
}

Click Run. The classifier should route this to the Slack urgent channel.


What you now understand

ConceptWhat it means
Template variable{{@nodeId:Label.field}} — references data from an upstream node
Auto-unwrapVariables automatically access inside the data object
Linear chainSequential data pipeline: A → B → C
Fan-outOne node's output consumed by multiple downstream nodes
Conditional routingCondition node splits execution into true/false branches
Expression whitelistOnly comparison/logical operators and literals allowed

Up next: Triggers & Webhooks — make your workflows callable from the outside world.

On this page