Grab your recipients' attention before they open your email! By personalizing your email subject line or preview text with data feeds, you make recipients feel valued by showing information that truly matters to them and boost your open rates.
Which emails can be personalized with data feeds?
Personalize your email subject lines and preview texts with data feeds in:
- Promotional emails or newsletters sent through campaigns.
- Automated email templates sent through the new automation editor.
- Transactional email templates triggered from a website via an eCommerce plugin or API.
Before you start
- Make sure you’ve learned all about data feeds in our dedicated article About data feeds in Brevo.
- Create the data feed that you will be using to personalize your email content. To learn more, check our dedicated article Create a data feed.
- Create an email campaign or an automation with the new editor that contains a Send an email step.
About data feed types and formatting in subject lines and preview text
The type of data you can include in your subject line and preview text, and their syntax depends on how you choose to insert your data feed:
The {} Add variable menu can be used to insert data feed with a flat, directly accessible structure with minimal nesting. By using the {} Add variable menu, you can fetch only data contained in the first-level items. |
➡️ To insert more complex data, check the dedicated tab [Advanced] Manually insert data feeds.
Unlike the {} Add variable menu, manually inserting data feed variables into your email allows you to fetch any data—including nested arrays and complex data structures. Data feed variables are formatted using double curly brackets. Depending on the complexity of your data feed structure, the format of your data feed variables varies: 🔡 Simple and directly accessible data structure
Simple data structures can easily be inserted using the {} Add variable menu. However, you can also manually insert them using the following syntax: {{feed.feedalias.variable}} You should then replace:
For example, to display the name of your next yoga class, your data feed variable would be: {{feed.yoga_classes.class_name}} 🔣 Complex and nested data structure
Complex and nested data feeds can only be inserted manually. The syntax of a complex data feed is: {{feed.feedalias.array.index.variable}} You should then replace:
For example, to display the name of the yoga class in the array following_classes, in index 0, your data feed variable would be: {{feed.yoga_classes.following_classes.0.class_name}} |
📧 Personalize your email subject line and preview text
To help you understand how to insert data feeds into your email subject line or preview text, we created a use case for illustration purposes that you can easily adapt to your needs: Send an upcoming yoga class alert to your recipients.
Open the tab corresponding to how you want to insert your data feed:
In this use case, we want to send an email with a subject line and preview text containing information on the upcoming yoga class. We will insert our data feed using the {} Add variable menu because this data is flat and directly accessible:
- Create an email campaign or an automation that contains the Send an email step.
- In the Subject line or Preview text field, enter your content and place your cursor where you want to insert your data feed variable.
- Click the {} Add variable icon and click Data feeds from the list.
- Select the data feed that contains the data you need for this email. In our example, yoga_classes.
- Select the variable you want to insert in your subject line or preview text, and that will be replaced with its value at the time of sending. When the data feed variable is correctly inserted, an orange placeholder with its name will appear. In our example:
- date in the subject line displays the date on which the yoga class will take place, and
- class_name in the preview text displays the name of the yoga class.
- (Optional) Apply filters to use a default value if the data feed is empty, or apply uppercase to your text, for example. To learn more, check our dedicated article Modify the formatting of your placeholders with filters.
- Finish the content of your subject line or preview text and click Save.
Email sent from Brevo | Email received by a recipient named John |
---|---|
Open the accordion below to discover the data feed structure we will be using to personalize our email. Our data feed alias is yoga_classes:
In this use case, we want to send an email with a subject line and preview text containing information on the upcoming yoga class. We will propose another yoga class if our recipient is not available for this first slot:
- Create an email campaign or an automation that contains the Send an email step.
- In the Subject line or Preview text field, enter your content and place your cursor where you want to insert your data feed variable.
- Choose the placeholder you need for your data feed and insert it into your subject line or preview text. We recommend adding the last two curly brackets only after replacing the values.
- Replace the values as described in the [Advanced] Manually insert data feeds tab of About data feed types and formatting in subject lines and preview text. When the data feed variable is correctly inserted, an orange placeholder with its name will appear. In our example:
-
{{feed.yoga_classes.date}}
in the subject line displays the date on which the yoga class will take place. -
{{feed.yoga_classes.class_name}}
in the preview text displays the name of the yoga class. -
{{feed.yoga_classes.following_classes.0.class_name}}
in the preview text as well, displays the name of the second next class.
-
- (Optional) Apply filters to use a default value if the data feed is empty, or apply uppercase to your text, for example. To learn more, check our dedicated article Modify the formatting of your placeholders with filters.
- Finish the content of your subject line or preview text and click Save.
Email sent from Brevo | Email received by a recipient named John |
---|---|
⏩ What's next?
- Personalize your email content with real-time data (data feeds)
- Personalize your SMS messages with real-time data (data feeds)
- Display a personalized list of items in automated emails (Abandoned cart, Order confirmation)
🤔 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.