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
Navigate to the Email template section.
Create a new template using Handlebars syntax for dynamic variables.
Follow this help document for detailed steps:
https://msg91.com/help/email/personalize-emails-with-handlebars-in-msg91Save the template once created.
Step 2: Create a Campaign with Email as a Channel
Log in to your MSG91 dashboard.
Go to Campaigns.
Click on Create Campaign.
Select Email as the channel.
Follow this help document for detailed steps: https://msg91.com/help/campaign/how-to-create-a-campaign-flow
Select the newly created Handlebar email template.
Save the campaign configuration.
Step 3: Launch the Campaign and Map Variables
Click Launch Campaign.
While launching, you will see a small red email icon next to the mapping section.
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.