With the Brevo Template Language, you can create dynamic messages that automatically personalize content for each contact. Simply insert variables, such as a contact’s name or email address, and they’ll be automatically replaced with the correct details when the message is sent. You can even customize visibility to show or hide specific parts of an email for different recipients.
💬 Variables
Variables, also known as placeholders or merge tags, are tags that you can insert into your messages to personalize them. When you send a message, each variable is automatically replaced with the corresponding contact’s information.
You can add variables by clicking the Add variable icon or by typing them manually using double curly brackets {{ }}. In the editors, variables may appear as yellow tags or as plain text.
The Brevo Template Language supports different types of variables:
Contact variables
| Available for: | ✅ SMS | ✅ Push |
Use contact attributes variables to include the details you store about your contacts in your messages. It can be their name, email address, or any other contact attribute you have in Brevo. If no information is stored for a specific contact, you can choose to display fallback text instead.
In the example below, the FIRSTNAME variable is automatically replaced by the contact's first name, "Amy", when they receive the email.
➡️ To learn more, check our dedicated articles:
- Personalize your emails using contact attributes
- Personalize your SMS messages with contact attributes
- Create a WhatsApp template
Email link and preview variables
| Available for: | ✖️ SMS | ✖️ Push |
Standard email variables enable your contacts to manage their subscription preferences and view your email in their browser. These variables are included in your email templates by default.
Here are the available standard email variables:
| Variable | Description |
|---|---|
| {{mirror}} | Displays a View in browser link |
| {{update_profile}} | Displays a Manage preferences link |
| {{unsubscribe}} | Display an unsubscribe link |
Date variables
| Available for: | ✅ SMS | ✖️ Push |
Use the timestamp variable to include the current time in your timezone in your messages.
Here is how the timestamp variable works:
| Variable | Description | Example value |
|---|---|---|
| {{time_now}} | Displays a timestamp with the current time in your timezone when you send your message | 2024-04-05 12:04:47.807783663 +0200 CESTI |
| {{time_now|date:"Monday, Jan 2, 2006"}} | Displays a timestamp with the current time in your timezone in the specified format when you send your message | Friday, April 5, 2024 |
➡️ To learn more, check the Format date and time section in our article Modify the output of a variable using filters.
Event variables (Transactional parameters)
| Available for: | ✅ Email (triggered only) |
✅ SMS (triggered only) |
✅ WhatsApp (triggered only) |
✖️ Push |
Use event data variables to include details about the transactions that your contacts made on your website. Event data variables can only be used in messages triggered by a contact's action.
In the example below, the event data variables are automatically replaced with details about the products the contact left in their cart when the email is sent.
➡️ To learn more, check our dedicated articles:
- Personalize your emails with event data
- Personalize your SMS messages with event data
- Personalize your WhatsApp messages with transactional parameters
Data feed variables
| Available for: | ✅ SMS | ✖️ Push |
Use data feed variables to personalize your marketing communications with the latest information about products, customers, events, or any other relevant data from your external data source or API.
In the example below, the variables are automatically replaced with details about the upcoming yoga classes when the email is sent.
➡️ To learn more, check our dedicated articles:
- Personalize your email subject line and preview text with real-time data (data feed)
- Personalize your email content with real-time data (data feed)
- Personalize your SMS messages with real-time data (data feeds)
Product feed variables
| Available for: | ✅ SMS | ✖️ Push |
Use product feed variables to generate a dynamic list of products from your online store and create personalized recommendations. With product feeds, showcase popular items, personalize recommendations, or maintain consistent product displays.
In the example below, the variables are automatically replaced at the time of sending with products tailored to each contact based on their recent purchases.
➡️ To learn more, check our dedicated article Create and send product recommendations with product feeds.
Coupon code variables
| Available for: | ✅ SMS | ✖️ Push |
Use coupon code variables to add a unique promotional code in your emails and SMS messages. Each of your campaign recipients will be assigned their own unique coupon code that can only be used once.
➡️ To learn more, check our dedicated article Send unique discount or coupon codes in emails and SMS messages.
📢 Conditional statements
| Available for: | ✖️ SMS | ✖️ Push |
👀 Conditional display (if statements)
Conditional display lets you show or hide parts of your email based on specific criteria for each contact. This allows you to tailor your content and create more personalized, targeted experiences.
You can use it to:
- Match the email language to each recipient’s country or language preference
- Show exclusive offers only to selected contacts
- Display different images based on your contacts’ interests
In the example below, a promotional offer is displayed only to contacts who made a purchase in the last month. If no purchase was made, the offer remains hidden.
You can show or hide parts of your emails using the Content visibility option in the drag and drop email editor. For more advanced use cases, you can manually build an if statement.
➡️ To learn more, check our dedicated articles:
- Show or hide content in your emails (Content visibility)
- [Manual] Show or hide content in your emails using if statements.
🔁 Repeatable sections (for loops)
Repeatable sections let you loop through a list of items and display them dynamically in your email. They’re especially useful for showcasing things like:
- Products in an abandoned cart
- Items in a purchase confirmation
- Events, bookings, or other repeated elements
In the example below, the section containing the product variables is automatically repeated for each item the contact purchased.
You can create repeatable sections in your emails using the Dynamic content block in the drag and drop email editor. For more advanced use cases, you can manually build a for loop.
➡️ To learn more, check our dedicated articles:
- Insert a dynamic content block to repeat event data section in Personalize your emails with event data
- Insert a dynamic content block to repeat data section in Personalize your email content with real-time data (data feed)
- Create and send product recommendations with product feeds
- [Manual] Repeat a block of items in your emails using for loops
🪄 Filters
| Available for: | ✅ SMS | ✖️ Push |
Filters let you customize how variables are displayed in your messages. You can use them to:
- Set a default value if a contact attribute is empty
- Format text, numbers, and dates to match your desired style
- Encode or encrypt data
In the example below, the FIRSTNAME variable is modified with a filter to display the contact’s first name in uppercase, no matter how it’s stored in your account.
➡️ To learn more, check our dedicated article Modify the output of a variable using filters.
🤔 Have a question?
If you have a question, feel free to contact our support team by creating a ticket from your account. If you don't have an account yet, you can contact us here.
If you’re looking for help with a project using Brevo, we can match you with the right certified Brevo Agency partner.