Variables & Dynamic Data

Overview

Variables are the data layer of Flow Builder. They let you store, transform, and inject dynamic values throughout your flow — in prompts, URLs, headers, request bodies, and variable assignments. The syntax is simple: wrap any variable name in double curly braces like {{variable_name}}.

Substitution Syntax

The {{variable_name}} syntax works everywhere text is accepted:

WhereExample
Conversation promptsYou are speaking with {{caller_name}}
Request URLshttps://api.example.com/users/{{user_id}}
Request headersAuthorization: Bearer {{api_token}}
Request body{"email": "{{email}}", "name": "{{full_name}}"}
Variable assignments{{first_name}} {{last_name}}
Query parametersfilter={{status}}&limit=10

At runtime, the engine replaces each {{variable}} with its current value before the node executes.

Variable Categories

Variables are organized into four categories in the VariablePicker UI:

Right Now

Date and time variables that resolve to the current moment at runtime:

  • {{current_date}} — Today's date
  • {{current_time}} — Current time
  • {{current_day}} — Day of the week

System

Session-level variables populated automatically:

  • {{session_key}} — Unique identifier for the current session
  • {{flow_id}} — ID of the running flow

Flow Variables

User-defined variables set via Variable nodes, Extraction nodes, or initialized via webhook. These are the variables you create and control.

Node Outputs

Variables automatically created by specific node types:

  • Extraction nodes — Each extraction creates a variable with the extracted value
  • Request nodes — Creates {{responseVariable}}, {{responseVariable_status}}, and {{responseVariable_error}}
  • Tool/Function nodes — Results accessible via {{_last_function_result}}

The VariablePicker UI

When editing any field that supports variables, click the variable icon ({x}) to open the VariablePicker. It shows all available variables organized by category, with a search bar to quickly find what you need. Click a variable to insert it at the cursor position.

Special Variables

VariableDescription
{{_last_function_result}}The return value of the most recently executed Tool/Function node
{{response_status}}HTTP status code from the last Request node (if using a generic name)
{{responseVariable_status}}HTTP status code from a specific Request node's response
{{responseVariable_error}}Error message from a specific Request node if it failed

Variables Webhook (Initialization)

You can configure a variables webhook at the flow level. When a new session starts, the engine calls this webhook before the first node executes. The webhook response should return a JSON object of key-value pairs — each pair becomes a flow variable.

This is how you pre-load caller data, account information, or configuration into the flow at the start of every conversation:

// Webhook response example
{
  "caller_name": "Sarah Johnson",
  "account_id": "ACC-4821",
  "plan": "premium",
  "language": "English"
}

These variables are immediately available in your start node's prompt and throughout the flow.

Tip: Use the variables webhook to pass caller ID, CRM data, or session context into your flow. This lets the AI greet callers by name and skip data collection steps.


Was this article helpful?