What Are Mustache Variables?
Mustache variables are placeholders used to personalize messages using contact-specific data. They are written inside double curly braces, like this:
{{first_name}} or {{last_donation_amount}}
When your message is sent, these placeholders are replaced with actual values from your contact records. For example:
Message:
Hi {{first_name}}, thank you for your support.
Sent result:
Hi Sarah, thank you for your support.
What Does the “Invalid Mustache Variable” Error Mean?
If you see an error message like:
⚠️ The campaign message contains invalid Mustache variables: FirstName. Please review and correct them before proceeding.
This just means the system couldn’t recognize one or more of the variables in your message.
Common Reasons This Error Occurs
Incorrect Spelling
Mustache variables need to be spelled correctly. For example:
Correct:
{{first_name}}
Incorrect:
{{FirstName}}
or{{First Name}}
Missing Custom Field
The field you're trying to use may not exist in your contact database. If the field wasn’t created during import or added via the API, it won’t be recognized.Extra or Missing Braces
Make sure each variable starts with{{
and ends with}}
.
Variables are not case-sensitive, but they must be spelled exactly as they appear in your contact fields. You’ll know you have it right when the variable name turns red in the message preview (see screenshot below).
Tip: Type {{ and select the correct variable from the list.
How to Fix It
Double-check your variable names against the fields you’ve uploaded or created.
Use the import feature to create custom fields if they don’t already exist.
Just type
{
{ and choose from the available variables in the dropdown list.
If you pasted your message or selected a saved template, delete the variables and re-insert them by typing {
{ and then picking from the list. This will ensure accuracy.
Best Practice for Testing
Use a contact record that includes all expected fields when previewing or testing your message. That way, you can confirm variables are rendering properly.
For further help, reach out to [email protected] or use the chat option in your dashboard.