> ## Documentation Index
> Fetch the complete documentation index at: https://docs.assistable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Use variables in a flow

> Pass known values between prompts, decisions, and actions without mixing variable namespaces.

Flow variables carry information between steps. Refer to a value with `{{name}}`, for example `{{caller_email}}`. Use a clear name and identify which step supplies it before another step reads it.

## Where values come from

* **Flow variables:** initial values configured in the flow.
* **Variable nodes:** literal or composed text.
* **Extraction nodes:** values collected from conversation history.
* **Request nodes:** response text and status under the response name you choose.
* **Runtime context:** session information and values supplied by the assistant or connected channel.

The variable picker lists useful names; it does not prove every listed value is present in every session. A standalone editor test and a conversation attached to a contact can have different context.

## Built-in flow variables

Use the exact, case-sensitive name inside double braces: `{{system.flow_id}}`. Values are text. Names can contain letters, digits, underscores, and dots; dots are part of a flat name, not automatic nested-object lookup. Unknown placeholders remain unchanged. Do not put spaces or hyphens in a variable name you intend to substitute.

The flow computes the following 28 values each turn. Date/time values use the flow's timezone; without a supplied timezone, the engine uses UTC. The assistant's channel can supply a timezone when the flow has none. Examples below illustrate 20 October 2026 at 02:03:04 PM in New York; they are not current-time values.

| Variable | Meaning and example |
| - | - |
| `{{system.session_id}}` | Session key, such as `conv:abc123`; empty when no session key is supplied. |
| `{{system.conversation_id}}` | Session key with a leading `conv:` removed; otherwise the unchanged session key. It is not always a CRM conversation ID. |
| `{{system.flow_id}}` | ID of the running flow. |
| `{{system.flow_name}}` | Flow display name; empty if absent. |
| `{{system.start_node_id}}` | Configured entry node ID. |
| `{{system.current_node_id}}` | Node currently being processed; refreshed when the flow changes node. |
| `{{system.current_node_label}}` | Current node's label; empty if absent. |
| `{{system.message_count}}` | Number of retained history entries at turn start, including assistant/tool entries; not a lifetime count of customer messages. |
| `{{system.turn_count}}` | Number of user entries in retained history at turn start; not a lifetime counter. |
| `{{right_now.current_date}}` | Full display date and time: `Tuesday October 20, 2026 02:03:04 PM EDT`. |
| `{{right_now.current_time}}` | Time with seconds, AM/PM, and zone: `02:03:04 PM EDT`. |
| `{{right_now.date}}` | Date: `2026-10-20`. |
| `{{right_now.time}}` | Time with seconds and AM/PM: `02:03:04 PM`. |
| `{{right_now.date_time}}` | `2026-10-20 02:03:04 PM`. |
| `{{right_now.timezone}}` | Timezone identifier, such as `America/New_York`. |
| `{{right_now.timezone_abbr}}` | Formatted timezone abbreviation, such as `EDT`; can change with daylight saving time. |
| `{{right_now.second}}` | Two-digit second: `04`. |
| `{{right_now.minute}}` | Two-digit minute: `03`. |
| `{{right_now.hour}}` | Two-digit 12-hour clock hour: `02`. |
| `{{right_now.am_pm}}` | `AM` or `PM`. |
| `{{right_now.day_of_the_week}}` | Full weekday name, such as `Tuesday`; not a number from 0–6. |
| `{{right_now.day_name}}` | Full weekday name; same value as `day_of_the_week`. |
| `{{right_now.day}}` | Two-digit day of month: `20`. |
| `{{right_now.month}}` | Full month name: `October`. |
| `{{right_now.month_number}}` | Two-digit month: `10`. |
| `{{right_now.year}}` | Four-digit year: `2026`. |
| `{{right_now.tomorrow_date}}` | Next calendar date in the flow timezone: `2026-10-21`. |
| `{{right_now.day_after_tomorrow_date}}` | Calendar date two days later: `2026-10-22`. |

These built-ins overwrite same-named defaults at the start of a turn. Keep your own state under distinct names. The history window is capped at 40 entries and repaired to keep valid tool-call pairs, so message and turn counts can stop growing or decrease.

## Context names shown in the picker

The picker also lists the following names. They are **not computed by the flow engine**: a channel integration, initialization webhook, or explicit value must supply them. For example, a standalone editor test does not automatically fetch a GHL contact.

| Picker name | Meaning when your integration supplies it |
| - | - |
| `{{system.contact_id}}` | Contact identifier. |
| `{{system.location_id}}` | Location/account identifier; choose the identifier your receiver expects. |
| `{{system.assistant_id}}` | Assistant identifier. |
| `{{system.calendar_id}}` | Booking calendar identifier. |
| `{{contact.id}}` | Contact identifier in the contact namespace. |
| `{{contact.first_name}}` | First name. |
| `{{contact.last_name}}` | Last name. |
| `{{contact.name}}` | Full name. |
| `{{contact.email}}` | Email address. |
| `{{contact.phone}}` | Phone value supplied by the integration. |
| `{{contact.phone_raw}}` | Alternate/raw phone value; format depends on the supplying integration. |
| `{{contact.timezone}}` | Contact timezone. |
| `{{contact.address1}}` | Street address. |
| `{{contact.city}}` | City. |
| `{{contact.state}}` | State or region. |
| `{{contact.postal_code}}` | Postal code. |
| `{{contact.country}}` | Country. |
| `{{contact.company_name}}` | Company. |
| `{{contact.website}}` | Website. |
| `{{contact.source}}` | Contact source. |
| `{{contact.tags}}` | Tags in the representation supplied by the integration. |
| `{{contact.notes}}` | Notes, if explicitly supplied. |
| `{{contact.date_of_birth}}` | Birth date, if explicitly supplied. |

For the full channel-specific CRM maps and their actual formats, see [assistant and CRM variables](/v3/guides/assistants/variables). A name appearing in both lists does not make its availability identical.

## Values produced by nodes

| Source | Output and behavior |
| - | - |
| Default Variables | Your chosen name and initial text value. New sessions start from these defaults. |
| Variable node | Each assignment stores literal text or substituted text under its configured name. |
| Extraction node | Each configured name receives extracted text; unknown/sentinel answers become empty text. |
| API Call node | A configured name such as `lookup` receives response text; `lookup_status` receives the HTTP status; `lookup_error` is written when a request error occurs. Check status on every run: an earlier error value is not automatically cleared by a later successful request. |
| Tool node | `_last_function_result` contains the most recent JSON-serialized result. `_last_function_error` can contain a caught error. These are transient diagnostics and can retain earlier values; inspect the current tool result before branching on them. |

## Initialization webhook options

Open **Variables**, then use the webhook controls in **Default Variables**.

| Setting | Choices, default, and behavior |
| - | - |
| Enabled | Off by default. Enable to load values on the first turn of a new session. |
| URL | Publicly reachable endpoint. Use a literal URL; this initializer does not substitute variables in its URL or headers. |
| Method | GET or POST; default POST. POST sends JSON with `session_key`, `flow_id`, and current `variables`. GET sends no JSON body and does not automatically append those fields to the URL. |
| Timeout (ms) | Default 3000. The editor offers 500–30000 in steps of 500; this is the initializer setting, separate from an API Call node's timeout. |
| Headers | Add/remove name/value pairs, for example `Authorization: Bearer …`. Values are sent as configured. |

Return `{"variables":{"caller_name":"Sarah","plan":"premium"}}`. Returned keys overwrite existing keys before built-ins are refreshed. Each returned value is converted to text with string conversion, so use scalar values or explicitly serialized JSON strings when a later node needs structured data.

Failure or invalid/missing `variables` does not stop the flow. Check required values before an external action and provide a recovery branch.

## Check values before use

An unknown placeholder can remain visible as `{{name}}`. If that appears in a message, confirm the spelling and ensure the assignment ran before the message. Check required data with Logic and ask for it when missing.

Treat `_last_function_result` as a transient tool-result value, not durable application storage. For a record that must outlive the conversation, write it through an explicit integration and verify that write.

See [Extraction and Variable nodes](/v3/guides/flows/collect-values) and [Request nodes](/v3/guides/flows/api-requests).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.