# Message Templates - How to Use Buttons with Dynamic URL

In SprintHub, it is possible to use WhatsApp API templates for sending automatic 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 will show the step-by-step process to create a template with a dynamic URL in a practical way.

***

### ✅ Prerequisites

* Have the integration of **WhatsApp API** active in your SprintHub account.
* Have an approved number in **Meta Business (Facebook Business)**.
* Have access permission to the **WhatsApp API Templates** area 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 **"Create Template"**.
2. Fill in the following fields:

* **Internal name:** a name to identify internally (e.g.: scheduling\_calendar).
* **Template name (Meta):** name that will be used on the Meta platform (no spaces).
* **Category:** select according to the purpose of the message (e.g.: "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**
2. section. <mark style="color:green;">Select the button type:</mark>
3. Call to Action. <mark style="color:green;">Choose the option:</mark>
4. Visit website.

* **Fill in the fields:** Button text:
* **example: "Access Link"** Base URL:

<mark style="color:green;">`enter the default URL, e.g.:`</mark>\
<https://mycompany.com.br/scheduling?id=\\{{1\\}}>

<mark style="color:green;">`Or:`</mark>

<https://mysite.com.br/payment/\\{{1\\}}/\\{{2\\}}> *📝<mark style="color:green;">{{1}}</mark>, <mark style="color:green;">{{2}}</mark>The variables (*

***

#### ) will be dynamically replaced according to the content sent in the automation or queue.

1. 5\. Submit for Approval
2. Click on **Review the content.**
3. "Save and Submit for Approval."

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

***

### The template will be sent to Meta (Facebook/WhatsApp) and typically the response occurs within up to 24 business hours.

🚀 Using the Template with Dynamic URL

* **After the template is approved, it will be available for use in the following places:**
* **CRM or 360º Support Automation**
* **Message Queue**

Automation Flows

<mark style="color:green;">`💡 When using it, insert the data that will compose the dynamic URL into the variables. Example:`</mark>

Hello {{1}}, access your exclusive link: {{2}}

* In the automation:
* {{1}} → Lead's 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 into production. **URLs with many parameters should be** shortened
* or carefully validated. **If you use variables,** keep the

***

**correct order 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 lead name, service ID or campaign-specific data, it is possible to offer more contextualized and automated communication, facilitating the team's work and improving the customer experience.


---

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