Variables & Personalization
Variables let you insert contact-specific data into email templates. Write {{firstName}} in your email and Correios replaces it with the contact's actual first name when the email is sent.
Basic Syntax
Variables use double-curly-brace syntax: {{variableName}}
Built-in Contact Fields
These resolve directly from the contact record without the custom. prefix:
Custom Fields
All other data is stored in custom fields and accessed with the custom. prefix:
Custom fields are created in Settings > Custom Fields and populated by your app when syncing contacts via POST /contacts (using the custom_values object) or when firing events via POST /events (using the properties object).
Fallback Values
If a variable resolves to empty, you can provide a fallback:
If firstName is empty, this renders as "Hi there,".
Chained fallbacks — try multiple variables before falling back to a literal:
Resolution order:
- Try
custom.nickname - If empty, try
firstName - If still empty, use "there"
Date Modifiers
For date fields, you can format the value directly in the template:
Formatted date (PHP-style format tokens):
→ "Your trial ends on March 23, 2026."
Supported tokens: F (full month), M (short month), j (day), d (day zero-padded), Y (4-digit year), y (2-digit year), n (month number), m (month number zero-padded)
Relative date:
→ "Your trial ends in 7 days." or "Your trial ended 2 days ago."
Date modifiers apply to the primary variable only — they don't apply to fallbacks.
Spintax
Spintax lets you randomise parts of your email — useful for subject line variation and avoiding duplicate content across large sends.
Each time the email is sent, one option is picked at random.
Subject line variation:
Body variation:
Rules:
- At least 2 options required
- Options are separated by
| - No nesting RANDOM blocks inside each other
- Options can be empty strings (for "include or omit" patterns) — but use carefully
Conditionals
Conditionals let you show different content based on whether a field has a value:
Syntax:
Truthy values: Any non-empty, non-zero, non-"false" value is considered truthy. So hasUploadedVideo = "true" is truthy, hasUploadedVideo = "false" is not.
Works with custom fields and built-in fields:
Inner variables inside conditional branches are still resolved normally:
When to Use Conditionals vs Flow Nodes
There are three ways to send different content to different contacts in Correios:
Use {{#if}} when the emails are 90% the same and you're just tweaking one paragraph. The email is simpler to maintain as a single template.
Use a Branch node when the two groups need meaningfully different emails — different subject, different CTA, different framing. Maintaining two separate templates is cleaner than one giant template with big {{#if}} blocks.
Use an Audience Filter when one group shouldn't receive the email at all. If a user has already subscribed, filter them out rather than sending them an email with a big {{#if custom.isSubscribed}}{{else}}...{{/if}} block.
Real Examples (from vitelnk)
Trial end date in email:
Personalised nudge email subject:
Upload status conditional:
Win-back email with reactivation link:
Fallback for nickname:
