
user_id. If ten users are talking to your agent simultaneously, their variable values are completely independent.
Creating variables
You can create a variable from anywhere your can insert them — type{ in most text inputs across Voiceflow to see your existing variables or create a new one inline.


Using variables
Reference a variable by typing{ and selecting it from the searchable menu. Variables work inside playbook instructions, API tool URLs and headers, condition steps, response messages, and more. If you’re in a place where you need to use a variable, type { and it the menu will pop up.

Setting variable values
| Method | How it works |
|---|---|
| Set step | Assign a value directly in a workflow |
| Code step | Set values using JavaScript logic |
| Tool responses | Capture the response from an API tool or function and store it in a variable |
| Playbook exit conditions | Variables attached as exit conditions on a playbook are filled by the agent during the conversation, then passed back when the playbook completes via a playbook step |
Built-in variables
Every project has access to built-in variables that are automatically set when a conversation begins or when certain events occur.| Variable | Description | Example |
|---|---|---|
user_id | The user’s unique ID, set via the web chat widget or API. For phone integrations, this is the caller’s phone number. | example_user or +16471234567 |
last_utterance | The previous message sent by the user | My name is Braden and I like cookies. |
last_response | The agent’s most recent response | Hello, I'm an agent! How can I help today? |
last_event | The last event the user triggered (object, not string) | {"type":"event","payload":{"event":{"name":"buySyrup"}}} |
vf_memory | The last ten user inputs and agent responses as a string, including tool calls | agent: Hey what's up?\nuser: I want to order maple syrup. |
vf_now | Current date and time. Timezone configurable in Settings → General | Jan 1, 2025, 16:37 |
vf_date | Current date | Jan 1, 2025 |
vf_time | Current time | 16:37 |
vf_month | Current month | January |
vf_day | Current day of the month | 1 |
vf_year | Current year | 2025 |
vf_user_timezone | The user’s timezone. Defaults to project timezone if unavailable | America/Toronto |
sessions | Number of times this user has opened the agent | 8 |
timestamp | UNIX timestamp of when the conversation began | 873700668 |
locale | The user’s locale, detected from their browser | en-CA |
platform | The platform your agent is running on | voiceflow |