> 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/message-templates-meta/message-templates-whatsapp-api/message-templates-how-to-use-buttons-with-dynamic-urls.md).

# Message Templates - How to Use Buttons with Dynamic URLs

At SprintHub, it is possible to use WhatsApp API templates for sending automated and personalized messages — including dynamic URLs, which are useful for directing the lead to specific pages such as scheduling, payments, forms, and more.

In this article, we'll show you step by step how to create a template with a dynamic URL in a practical way.

***

### ✅ Prerequisites

* Have the **WhatsApp API** integration active in your SprintHub account.
* Have an approved number in **Meta Business (Facebook Business)**.
* Have access permission to the area of **WhatsApp API Templates** in the system.

***

### Step by Step to Create a Template with a Dynamic URL

#### 1. Access the Templates Area

1. Go to the SprintHub side menu.
2. Click on **System Settings** ⚙️.
3. Then, select **WhatsApp API > Message Templates**.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcvjTvGEshTi9ruVspFaynjVxTocna4S4gCvw7QYa-5rVmTrPtxIYLRb8rU19evmkWLbmAEILPn-LvzJm8zGmfaz5FoCtXdYqD9qAj42Xt5tybiMJ6IKG_EDMW-NkEPJQ2-kXPH?key=7mI2mxzJxY5f8JXaFvOUMQ" alt=""><figcaption></figcaption></figure>

***

#### 2. Create a New Template

1. Click the button **“Create Template”**.
2. Fill in the following fields:

* **Internal name:** a name to identify internally (ex: scheduling\_calendar).
* **Template name (Meta):** name that will be used on Meta's platform (no spaces).
* **Category:** select according to the objective of the message (ex: “Marketing”).
* **Language:** select "Portuguese (BR)".
* **Channel:** select the integrated WhatsApp API number.

***

#### 3. Structure the Message Content

* Header (optional): can contain a title or even a variable.
* Message body: write the main message. Use numbered variables if necessary, such as:

<mark style="color:green;">`Hello {{1}}, your appointment is available at the link below:`</mark>

***

#### 4. Add the Button with the Dynamic URL

1. Go to the **Buttons section.**
2. Select the button type: <mark style="color:green;">Call to Action.</mark>
3. Choose the option: <mark style="color:green;">Go to the website.</mark>
4. Fill in the fields:

* **Button text:** example: “Access Link”
* **Base URL:** type the default URL, e.g.:

<mark style="color:green;">`https://minhaempresa.com.br/agendamento?id={{1}}`</mark>\
Or:

<mark style="color:green;">`https://meusite.com.br/pagamento/{{1}}/{{2}}`</mark>

📝 *The variables (<mark style="color:green;">{{1}}</mark>, <mark style="color:green;">{{2}}</mark>) will be replaced dynamically according to the content sent in the automation or queue.*

***

#### 5. Submit for Approval

1. Review the content.
2. Click on **“Save and Submit for Approval”.**
3. The template will be sent to Meta (Facebook/WhatsApp) and usually the response occurs within up to 24 business hours.

{% embed url="<https://youtu.be/3NXnoCFZ3uE>" %}

***

### 🚀 Using the Template with Dynamic URL

After the template is approved, it will be available for use in the following places:

* **CRM Automation or 360° SAC**
* **Message Queue**
* **Automation Flows**

💡 When using it, enter the data that will make up the dynamic URL in the variables. Example:

<mark style="color:green;">`Hello {{1}}, access your exclusive link: {{2}}`</mark>

In the automation:

* {{1}} → Lead Name
* {{2}} → Personalized URL (based on a custom field, for example)

***

### ✅ Important Tips

* The dynamic URL needs to be **well formatted** and preferably secure (https).
* Test before putting it into production.
* URLs with many parameters should be **shortened** or carefully validated.
* If using variables, **keep the order** correct between the message content and what will be replaced.

***

**CONCLUSION**

Using the **Dynamic URL** in the WhatsApp API button is a strategic practice that enhances personalization and service efficiency. By generating personalized links with dynamic variables, such as the lead's name, service ID, or specific campaign data, it is possible to offer more contextualized and automated communication, making the team's work easier and improving the customer experience.

In addition, this approach makes it possible to track the origin of clicks, evaluate the performance of marketing actions, and ensure that the lead arrives at service with pre-filled information, saving time and reducing errors. In short, it is an intelligent solution for integrating channels, streamlining processes, and scaling results with greater precision and agility.


---

# 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/message-templates-meta/message-templates-whatsapp-api/message-templates-how-to-use-buttons-with-dynamic-urls.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.
