Personalize your messages with dynamic content (Brevo Template Language)

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: ✅ Email ✅ SMS ✅ WhatsApp ✅ 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.

email_BTL_contact-attribute-placeholders_example_en-us.jpeg

➡️ To learn more, check our dedicated articles:

Email link and preview variables

Available for: ✅ Email ✖️ SMS ✖️ WhatsApp ✖️ 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: ✅ Email ✅ SMS ✖️ WhatsApp ✖️ Push

Use the timestamp variable to include the current time in your timezone in your messages.

email_BTL_timestamp-placeholder_example_en-us.jpeg

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
❗️ Important
If you have not set the timezone in your Brevo account, the variable will return the current timestamp in UTC by default.

➡️ 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.

email_BTL_event-placeholders_example_en-us.jpeg

➡️ To learn more, check our dedicated articles:

Data feed variables

Available for: ✅ Email ✅ SMS ✖️ WhatsApp ✖️ 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.

email_BTL_data-feed_example_en-us.jpeg

➡️ To learn more, check our dedicated articles:

Product feed variables

Available for: ✅ Email ✅ SMS ✖️ WhatsApp ✖️ 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.

email_BTL_product-feed_example_en-us.jpeg

➡️ To learn more, check our dedicated article Create and send product recommendations with product feeds.

Coupon code variables

Available for: ✅ Email ✅ SMS ✖️ WhatsApp ✖️ 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.

email_BTL_coupon-code_example_en-us.jpeg

➡️ To learn more, check our dedicated article Send unique discount or coupon codes in emails and SMS messages.

📢 Conditional statements

Available for: ✅ Email ✖️ SMS ✖️ WhatsApp ✖️ 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.

email_BTL_show-hide_example_en-us.gif

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:

🔁 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.

email_BTL_repeatable-block_example_en-us.jpeg

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:

🪄 Filters

Available for: ✅ Email ✅ SMS ✖️ WhatsApp ✖️ 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.

email_BTL_modifiers_example_en-us.jpeg

➡️ 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.

💬 Was this article helpful?

23 out of 154 found this helpful