Text SMS
WhatsApp
Hello Contact Center
More
Add ons and Plug ins
Resellers

Using Handlebar Email Templates in Campaigns (MSG91)

This guide will help you create and use a Handlebar-based email template inside an email campaign and map the required variables before launching.


Step 1: Create an Email Template using Handlebars

  1. Navigate to the Email template section.

  2. Create a new template using Handlebars syntax for dynamic variables.

  3. Follow this help document for detailed steps:
    https://msg91.com/help/email/personalize-emails-with-handlebars-in-msg91

  4. Save the template once created.


Step 2: Create a Campaign with Email as a Channel

  1. Log in to your MSG91 dashboard.

  2. Go to Campaigns.

  3. Click on Create Campaign.

  4. Select Email as the channel.

  5. Follow this help document for detailed steps: https://msg91.com/help/campaign/how-to-create-a-campaign-flow

  6. Select the newly created Handlebar email template.

  7. Save the campaign configuration.


Step 3: Launch the Campaign and Map Variables

  1. Click Launch Campaign.

  2. While launching, you will see a small red email icon next to the mapping section.

  3. Click on this email icon to open the variable mapping window.

Variable Mapping Screen

  • Click on the Map option to map the variables.

Mapping Rules:

  • Use $ to map a value from a CSV column.

  • Use # to assign a custom/static value.

Example:

"name": "$name"
"ctaLink": "#https://example.com"
"supportEmail": "#[email protected]"


Important Notes

  • Ensure your CSV file contains the correct column names matching the Handlebar variables.

  • Always verify mapping before launching the campaign.

  • Use Test Run to validate the campaign before sending it to all recipients.