Skip to main content

Working with Variables & Merge Tags

Personalize your email templates with dynamic variables and merge tags.

Variable Syntax

Mailofly uses double curly braces for variables:

Fallback Values (Default Content)

To prevent empty spaces when a variable is not provided for a specific contact, specify a fallback using the pipe | syntax:
  • If first_name is "Sarah", it renders: Hey Sarah,
  • If first_name is missing or null, it renders: Hey there,

Reserved System Variables

Mailofly automatically injects the following system merge tags into every send:

Nested Objects and Arrays

You can access nested fields inside structured objects:
And in your API request: