> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/strategies/tokens/using-variable-tokens-within-the-chatbot.md). Agents can also search and read this documentation through its [MCP server](https://docs.sprinthub.com/~gitbook/mcp).

# Using Variable Tokens within the Chatbot

How to create variables and use tokens to transfer data between blocks and actions.

## Creating a variable

Variables in a chatbot are used to temporarily store data, allowing this information to be accessed and reused later within the flow. However, this data remains available only during the chatbot's execution, that is, it is not persisted after the interaction ends.

To save a response in a variable, it is first necessary to create the variable in the field **"Save response in a variable"**, available in the block **"Send Question"**.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FhWcte6j882WFYKwir7Mz%2F1.png?alt=media&amp;token=19290d13-1c37-4780-82cb-c57dd8427cb4" alt=""><figcaption><p><em>Saving the lead's response in a variable.</em></p></figcaption></figure>

## Using a variable token - Send Message block

The token follows the format `{var=Pet Name}`, with braces, the word **`var`** and the variable name after the equals sign (`=`). When the message is sent, the token will be replaced by the variable filled in by the lead.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FCWAoYa634YWvlG7CzShv%2F2.png?alt=media&amp;token=17e18995-4c20-410c-90ed-05ad311d7d25" alt=""><figcaption><p><em>Token inside the 'Send Message' block.</em></p></figcaption></figure>

## Using a variable token - Send Webhook action

The variable token can be used in various actions, such as the action **"Send Webhook"** , to send data to an external platform.

In the case below, a webhook is being sent containing the lead's registered email and the pet's name, which was saved through the variable.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2F4EYt6waxB8M4mTK1AZNa%2F3.png?alt=media&amp;token=a588e3ab-b938-430e-9994-2fae21ffc2d2" alt=""><figcaption><p><em>Token inside the 'Send Webhook' action.</em></p></figcaption></figure>
