---
title: How to set up variables in WhatsApp templates
description: Template variables (such as {{1}}, {{2}}, {{3}}) let you personalize messages with...
---

[Skip to content](https://help.leadster.com.br/en-us/article/386-how-to-set-up-variables-in-whatsapp-templates#main-content)

- [English - United States](https://help.leadster.com.br/en-us/article/386-how-to-set-up-variables-in-whatsapp-templates)
- [Español](https://help.leadster.com.br/es/article/386-como-configurar-variables-en-las-plantillas-de-whatsapp)
- [Português - Brasil](https://help.leadster.com.br/pt-br/article/386-como-configurar-variaveis-nos-templates-de-whatsapp)

English - United States

Show submenu for translations

[![leadster](https://help.leadster.com.br/hs-fs/hubfs/leadster-logo-colorida.png?width=168&height=36&name=leadster-logo-colorida.png)](https://help.leadster.com.br/pt-br?hsLang=en-us)

Open main navigation

Close main navigation

- - [English - United States](https://help.leadster.com.br/en-us/article/386-how-to-set-up-variables-in-whatsapp-templates)
    - [Español](https://help.leadster.com.br/es/article/386-como-configurar-variables-en-las-plantillas-de-whatsapp)
    - [Português - Brasil](https://help.leadster.com.br/pt-br/article/386-como-configurar-variaveis-nos-templates-de-whatsapp)

  English - United States
  
  Show submenu for translations
- [Fale conosco](https://survey.hsforms.com/1dmIUytXBR8KNMnTsArZOZQejqhe)

[Fale conosco](https://survey.hsforms.com/1dmIUytXBR8KNMnTsArZOZQejqhe)

 Como podemos te ajudar?

- There are no suggestions because the search field is empty.

1. [Help Center - Leadster](https://help.leadster.com.br/en-us?hsLang=en-us)
2. [WhatsApp Suite](https://help.leadster.com.br/en-us/whatsapp-suite?hsLang=en-us)
3. [Templates](https://help.leadster.com.br/en-us/whatsapp-suite?hsLang=en-us#templates)

November 30, 2026

# How to set up variables in WhatsApp templates

Template variables (such as {{1}}, {{2}}, {{3}}) let you **personalize messages with dynamic data**, such as the contact's name, amounts, or external information.

**In this article**

- [How does it work?](https://help.leadster.com.br/en-us/article/386-how-to-set-up-variables-in-whatsapp-templates#como-funciona)
- [Where to set them up](https://help.leadster.com.br/en-us/article/386-how-to-set-up-variables-in-whatsapp-templates#onde-configurar)
- [How to set it up](https://help.leadster.com.br/en-us/article/386-how-to-set-up-variables-in-whatsapp-templates#como-configurar)
- [How to send](https://help.leadster.com.br/en-us/article/386-how-to-set-up-variables-in-whatsapp-templates#como-enviar) 
    - [WhatsApp campaigns](https://help.leadster.com.br/en-us/article/386-how-to-set-up-variables-in-whatsapp-templates#campanhas-de-whatsapp)
    - [WhatsApp flows](https://help.leadster.com.br/en-us/article/386-how-to-set-up-variables-in-whatsapp-templates#fluxos-de-whatsapp)
- [Highlight: preview with real values](https://help.leadster.com.br/en-us/article/386-how-to-set-up-variables-in-whatsapp-templates#diferencial-preview-com-valores-reais)
- [Important points 💡](https://help.leadster.com.br/en-us/article/386-how-to-set-up-variables-in-whatsapp-templates#pontos-importantes)

For them to work correctly, each variable must be mapped to a data source before sending.

## How does it work?

Whenever a template has variables, the platform asks you to define where each piece of information will come from. This mapping is done through a dropdown, where you choose the source of the data that will be inserted into the message.

Variables can be filled in from three main sources:

- Contact data (name, email, phone, first name, and last name)
- Custom attributes: to be shown, they must be registered beforehand — see how to set them up in this [**tutorial**](https://help.leadster.com.br/article/372-como-configurar-atributos-personalizados?hsLang=pt-br).
- Static values (set manually)

In flows, you can also use data coming from a webhook.

## Where to set them up

Variables can be used in three contexts in the platform:

**Individual messages:** Manual sends to a single contact. In this case, the preview already shows the real values that will be sent, making it easy to double-check.

**WhatsApp campaigns:** Scheduled bulk sends. Variables are resolved individually for each contact based on their saved data.

**WhatsApp flows:** Triggered automatically via webhook. They let you use external data (such as amount, date, discount), as well as contact information and static values.

## How to set it up

First, you need to create a [**template**](https://help.leadster.com.br/article/379-como-criar-templates-de-whatsapp?hsLang=pt-br)with variables. To do this:

1. Go to **Modelos de conteúdo \> WhatsApp** (Content templates \> WhatsApp) and click create template.
2. In the first step, fill in:

![](https://help.leadster.com.br/hubfs/Knowledge%20Base%20Import/file-odqHVVRATE-3.png)

- Template name
- Language
- Content type (in this example: text)

1. Then move on to the **message content** step.

In the message body field, write the text as usual and use the **“Adicionar variável”** (Add variable) button to insert dynamic variables.

1. Variables follow a sequential format:  **{{1}}, {{2}}, {{3}}**

Each one represents a piece of information that will be filled in at the time of sending.

When you add a variable, you must fill in a sample value. This value is used to validate the template and to simulate how the message will look.

For example:

- In variable {{1}}, if the idea is to include the contact's name, you can enter a sample name (e.g., Alexia)
- In variable {{2}}, if it's the company name, you can use a value like (e.g., Leadster)
- In variable {{3}}, if it's a link, you can enter a URL (e.g., [https://leadster.com.br/whatsapp-suite](https://leadster.com.br/whatsapp-suite?hsLang=pt-br)), which will usually be used as a static value.

![](https://help.leadster.com.br/hubfs/Knowledge%20Base%20Import/file-4Kc40RSdwn-3.png)

These examples aren't the final values sent, but they help you see how the message will be built and make sure the template is validated correctly.

After finishing the content:

1. Click **Criar** (Create)
2. Request template approval (using the option shown in the platform)

![](https://help.leadster.com.br/hubfs/Knowledge%20Base%20Import/file-NIAIbXfItB-3.png)

The template can only be used for sending after it's approved.

---

## How to send

![](https://help.leadster.com.br/hubfs/Knowledge%20Base%20Import/file-f7njkH40l3-3.gif)

**Individual messages:**

When you send manually to a single contact:

Open a contact or a conversation, select send template, and choose the template you want. Then map the variables.

You can use:

- Contact data (only fields that are filled in)
- Custom attributes (also only those that are filled in)
- Static value

The preview already shows the real values, so just check and send.

### WhatsApp campaigns

When you send in bulk:

Go to Campanhas \> WhatsApp (Campaigns \> WhatsApp), create a campaign, and select the inbox and the template. Then set the source of each variable.

You can use:

- Contact data
- Custom attributes
- Static value

After mapping, review the preview (with placeholders), set the audience, and schedule the send.

### WhatsApp flows

When sending is automated:

Go to Fluxos de WhatsApp (WhatsApp Flows), create or edit a flow, and, if needed, set up the webhook variables beforehand.

Add a send template step, select the template, and map the variables.

You can use:

- Contact data
- Webhook variables
- Static value

After that, review the preview (with placeholders) and save the flow.

---

## Highlight: preview with real values

An individual message is the only context where the preview shows the contact's real values.

This is because the message is sent to a specific, known contact. In campaigns and flows, the final recipient isn't defined yet at setup time, so the preview only shows placeholders (e.g., \[Contact - Name\]).

## Important points 💡

- For individual messages, the platform behaves in a few important ways.
- The dropdown only shows fields that have a value for the selected contact. In other words, if some information doesn't exist (such as email, for example), it won't appear as an option.
- The preview already shows exactly how the message will be sent, with all the real data filled in. This allows a complete check before sending.
- Internally, variables are resolved automatically based on the contact's most up-to-date data at the time of sending.
- Whenever a template is changed, the variable mappings are reset and need to be set up again.
- Finally, templates without variables keep working normally, with no change to the sending process.

Still have questions? Contact our support team.

Best regards 👋

- [WhatsApp Suite](https://help.leadster.com.br/en-us/whatsapp-suite?hsLang=en-us#main-content)

    - [Errors and solutions](https://help.leadster.com.br/en-us/whatsapp-suite?hsLang=en-us#errors-and-solutions)
    - [Templates](https://help.leadster.com.br/en-us/whatsapp-suite?hsLang=en-us#templates)
    - [Team and settings](https://help.leadster.com.br/en-us/whatsapp-suite?hsLang=en-us#team-and-settings)
    - [Campaigns and broadcasts](https://help.leadster.com.br/en-us/whatsapp-suite?hsLang=en-us#campaigns-and-broadcasts)
    - [Reports](https://help.leadster.com.br/en-us/whatsapp-suite?hsLang=en-us#reports)
    - [AI agent](https://help.leadster.com.br/en-us/whatsapp-suite?hsLang=en-us#ai-agent)
    - [Inbox and conversations](https://help.leadster.com.br/en-us/whatsapp-suite?hsLang=en-us#inbox-and-conversations)
    - [Integrations and source tracking](https://help.leadster.com.br/en-us/whatsapp-suite?hsLang=en-us#integrations-and-source-tracking)
    - [Getting started](https://help.leadster.com.br/en-us/whatsapp-suite?hsLang=en-us#getting-started)
- [Website Suite](https://help.leadster.com.br/en-us/website-suite?hsLang=en-us#main-content)

    - [Website installation](https://help.leadster.com.br/en-us/website-suite?hsLang=en-us#website-installation)
    - [Design and display](https://help.leadster.com.br/en-us/website-suite?hsLang=en-us#design-and-display)
    - [Conversion events (GA4, Meta, and Ads)](https://help.leadster.com.br/en-us/website-suite?hsLang=en-us#conversion-events-ga4-meta-and-ads)
    - [AI agent and Live Chat](https://help.leadster.com.br/en-us/website-suite?hsLang=en-us#ai-agent-and-live-chat)
    - [Create and edit the flow](https://help.leadster.com.br/en-us/website-suite?hsLang=en-us#create-and-edit-the-flow)
    - [Qualification and conditionals](https://help.leadster.com.br/en-us/website-suite?hsLang=en-us#qualification-and-conditionals)
    - [Dashboard and Analytics](https://help.leadster.com.br/en-us/website-suite?hsLang=en-us#dashboard-and-analytics)
    - [Conversion prompts](https://help.leadster.com.br/en-us/website-suite?hsLang=en-us#conversion-prompts)
    - [Redirect to WhatsApp and calendar](https://help.leadster.com.br/en-us/website-suite?hsLang=en-us#redirect-to-whatsapp-and-calendar)
    - [Flows by page and device](https://help.leadster.com.br/en-us/website-suite?hsLang=en-us#flows-by-page-and-device)
    - [Website chat leads](https://help.leadster.com.br/en-us/website-suite?hsLang=en-us#website-chat-leads)
- [ShopBot](https://help.leadster.com.br/en-us/shopbot?hsLang=en-us#main-content)

    - [Connect your store](https://help.leadster.com.br/en-us/shopbot?hsLang=en-us#connect-your-store)
    - [Set up ShopBot](https://help.leadster.com.br/en-us/shopbot?hsLang=en-us#set-up-shopbot)
- [Integrations](https://help.leadster.com.br/en-us/integrations?hsLang=en-us#main-content)

    - [Marketing events (Meta and GA4)](https://help.leadster.com.br/en-us/integrations?hsLang=en-us#marketing-events-meta-and-ga4)
    - [RD Station](https://help.leadster.com.br/en-us/integrations?hsLang=en-us#rd-station)
    - [CRMs](https://help.leadster.com.br/en-us/integrations?hsLang=en-us#crms)
    - [Webhook and connectors](https://help.leadster.com.br/en-us/integrations?hsLang=en-us#webhook-and-connectors)
    - [Marketing automation and other tools](https://help.leadster.com.br/en-us/integrations?hsLang=en-us#marketing-automation-and-other-tools)
    - [Overview and troubleshooting](https://help.leadster.com.br/en-us/integrations?hsLang=en-us#overview-and-troubleshooting)
- [Leads and reports](https://help.leadster.com.br/en-us/leads-and-reports?hsLang=en-us#main-content)

    - [Receiving leads and lead reports](https://help.leadster.com.br/en-us/leads-and-reports?hsLang=en-us#receiving-leads-and-lead-reports)
- [Account and plans](https://help.leadster.com.br/en-us/account-and-plans?hsLang=en-us#main-content)

    - [Subscription, payment, and cancellation](https://help.leadster.com.br/en-us/account-and-plans?hsLang=en-us#subscription-payment-and-cancellation)
    - [Get to know Leadster](https://help.leadster.com.br/en-us/account-and-plans?hsLang=en-us#get-to-know-leadster)
    - [Access, users, and security](https://help.leadster.com.br/en-us/account-and-plans?hsLang=en-us#access-users-and-security)
    - [Plans and free trial](https://help.leadster.com.br/en-us/account-and-plans?hsLang=en-us#plans-and-free-trial)

[![](https://help.leadster.com.br/hs-fs/hubfs/leadster-logo-colorida-2.png?width=187&height=40&name=leadster-logo-colorida-2.png)](https://leadster.com.br/?hsLang=en-us)

<https://www.instagram.com/leadster.ai/> <https://leadster.com.br/blog/?hsLang=en-us> [mailto:atendimento@leadster.com.br](mailto:atendimento@leadster.com.br)

Copyright © 2026, Leadster

```json
{
  "@context" : "https://schema.org",
  "@type" : "TechArticle",
  "author" : {
    "@type" : "Organization",
    "name" : "Leadster",
    "url" : "https://leadster.com.br"
  },
  "dateModified" : "2026-11-30T21:06:44Z",
  "datePublished" : "2026-11-30T21:06:42Z",
  "description" : "Template variables (such as 1, 2, 3) let you personalize messages with...",
  "headline" : "How to set up variables in WhatsApp templates",
  "inLanguage" : "en-US",
  "mainEntityOfPage" : "https://help.leadster.com.br/en-us/article/386-how-to-set-up-variables-in-whatsapp-templates",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://leadster.com.br/img/leadster-logo-v2.webp"
    },
    "name" : "Leadster",
    "url" : "https://leadster.com.br"
  },
  "url" : "https://help.leadster.com.br/en-us/article/386-how-to-set-up-variables-in-whatsapp-templates"
}
```