> 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/topics/relate/email/email-marketing-use-of-tokens.md).

# Email Marketing - Use of Tokens

In this example, imagine that you want leads to submit a form and receive a personalized marketing email with their name.&#x20;

Adding Tokens **can be done both in templates and in created emails** **through the builder** in SprintHub.&#x20;

To do this, follow this tutorial:&#x20;

* Before we begin, you need to create a form, [**to learn how to create forms in SprintHub click here**](https://docs.sprinthub.com/topicos/converter/formularios/formularios-configuracoes-iniciais/formularios-criacao-de-formularios)

1 - In the main menu, click on **'Relate'** and then on **'Emails'**;

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FRw0Ln58VNNIDZNHEu9jQ%2Fem1.png?alt=media&amp;token=1f2ce85d-e09e-4aba-865b-0f2ffd82f0b4" alt=""><figcaption></figcaption></figure>

**2 -** Click +New to create a new email template or click Edit to edit an existing template; \
Add a Name, set it to Published to make the email available, and click Open Builder.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FURM0GuCi4zIrrYH4dkzv%2Fem2.png?alt=media&amp;token=6bed56da-97e7-4875-867b-616d081a8338" alt=""><figcaption></figcaption></figure>

&#x20;**3 - In Dynamics,** click and drag Dynamic Text to where you want to position your text. Double-click to access the text editing area.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FF4lbT4x7wXVHcVKKWlhd%2Fem22.png?alt=media&amp;token=ba6fb70c-4050-4245-9f16-dbf0d9f9627d" alt=""><figcaption></figcaption></figure>

**4 - To add the token,** click on the + symbol and choose "(Lead) Name", the token will be added along with the text.&#x20;

{% hint style="info" %}
You can choose any other field that the lead previously filled out in the form.
{% endhint %}

After finishing, click the arrow to exit, then Close, and Save and Close.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2Fg2NoMzcbEDFs7yftCax2%2Fem4.png?alt=media&amp;token=a47ec092-a2fd-4856-a779-46449defe3f1" alt=""><figcaption></figcaption></figure>

* The next step will be creating the Automation Flow that will trigger the marketing email for the leads who filled out the form

1 - In the main menu, click on **'Relate**' and then in **'Automation Flows'**;

2 - Click on **New** to create a **new Automation Flow**

3 - Define a Name and click on **Open Builder and** **add an action to Send Email to the lead**

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FFctkIazseHYaGSFWmsX4%2Fem5.png?alt=media&amp;token=52be5b89-c0b8-493b-a43e-10b02899c17c" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Include the email template previously created with the builder in the action block within the Flow. The email type must be <mark style="color:red;">**necessarily Marketing Email, otherwise the token will not work.**</mark>
{% endhint %}

* Lastly, let's configure the form actions, [to learn more about Form Actions, click here](https://docs.sprinthub.com/topicos/converter/formularios/formularios-configuracoes-iniciais/formularios-criando-acoes)

1 - In the main menu, click on **'Convert**' and then in **'Forms**'

2 - Click on **Edit**

3 - Click on **Actions** and then on **New Action**

4 - Select **Change automation flows and c**place in the field the a **automation responsible for sending the marketing email to the lead, click on** Save and Close.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2F0XvQFxBfGrE7tUboZP7w%2Fem6.png?alt=media&amp;token=4bcdb96b-ece6-4716-956a-217ef5287ddb" alt=""><figcaption></figcaption></figure>

This way, it will be possible to automatically send personalized emails with the name of the lead who filled out a form.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.sprinthub.com/en/topics/relate/email/email-marketing-use-of-tokens.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
