Skip to Content
Workflow BuilderVariables & Conditions

Variables & Conditions

Learn how to store, manipulate, and use data in your workflows.

Variables

Variables store information collected during conversations. Use them to personalize responses and make decisions.

Creating Variables

Variables are automatically created when you:

  1. Use a Collect Input node (stores the user’s response)
  2. Use a Set Variable node
  3. Receive data from an API Call response

Variable Syntax

Reference variables using double curly braces:

Hello {{user.name}}! Your order {{order.id}} has been confirmed.

Built-in Variables

These variables are always available:

VariableDescription
{{user.id}}Unique user identifier
{{user.name}}User’s name (if provided)
{{user.email}}User’s email (if provided)
{{conversation.id}}Current conversation ID
{{message.text}}Latest user message

Custom Variables

Create your own variables to store:

  • User inputs from Collect Input nodes
  • API response data
  • Calculated values from Set Variable nodes

Example workflow variables:

  • {{customer_email}} — collected via Collect Input
  • {{selected_plan}} — from Quick Replies selection
  • {{api_response}} — from API Call result

Conditions

Conditions let you branch your workflow based on variable values.

Comparison Operators

OperatorDescriptionExample
equalsExact match{{status}} equals "active"
not equalsNot matching{{plan}} not equals "free"
containsSubstring match{{message}} contains "help"
greater thanNumeric comparison{{amount}} greater than 100
less thanNumeric comparison{{quantity}} less than 5
existsHas a value{{email}} exists
not existsNo value{{phone}} not exists

Using Conditions

In a Condition node:

  1. Add one or more conditions
  2. Each condition creates a branch
  3. The first matching condition’s branch is followed
  4. Always include a default branch for unmatched cases

Condition Examples

Route by user plan:

{{plan}} equals "premium" → Premium support flow {{plan}} equals "free" → Basic support flow Default → General flow

Check if email provided:

{{user.email}} exists → Personalized greeting Default → Ask for email

Numeric comparison:

{{cart_total}} greater than 100 → Offer free shipping Default → Standard checkout

Best Practices

  1. Use descriptive names: customer_email instead of e
  2. Validate input: Use validation in Collect Input nodes
  3. Handle edge cases: Always include default branches
  4. Test thoroughly: Check all condition branches work correctly
Last updated on