# Utilizando Tokens de Variáveis dentro do Chatbot

## Criando uma variável

As variáveis em um chatbot são utilizadas para armazenar dados temporariamente, permitindo que essas informações sejam acessadas e reutilizadas em momentos posteriores dentro do fluxo. No entanto, esses dados permanecem disponíveis apenas durante a execução do chatbot, ou seja, não são persistidos após o término da interação.

Para salvar uma resposta em uma variável, é necessário primeiro criar a variável no campo **"Salvar resposta em uma variável"**, disponível no bloco **"Enviar Pergunta"**.

<figure><img src="/files/13YqsWzq27B3vDKCEt9P" alt=""><figcaption><p><em>Salvando resposta do lead em uma variável.</em></p></figcaption></figure>

## Utilizando token da variável - Bloco Enviar Mensagem

O token segue o formato `{var=Nome Pet}`, com chaves, a palavra **`var`** e o nome da variável após o sinal de igual (`=`). No momento do envio da mensagem, o token será substituído pela variável preenchida pelo lead.

<figure><img src="/files/Ivw91148YHfarWwdeUUr" alt=""><figcaption><p><em>Token dentro do bloco 'Enviar Mensagem'.</em></p></figcaption></figure>

## Utilizando token da variável - Ação de Enviar Webhook

O token de variável pode ser usado em diversas ações, como na ação **"Enviar Webhook"** , para enviar dados para uma plataforma externa.

No caso abaixo, está sendo enviado um webhook contendo o e-mail cadastrado do lead, e o nome do pet, que foi salvo através da variável.

<figure><img src="/files/ZcYyHNbQKU9rooE2LbXr" alt=""><figcaption><p><em>Token dentro da ação 'Enviar Webhook'.</em></p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sprinthub.com/estrategias/tokens/utilizando-tokens-de-variaveis-dentro-do-chatbot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
