Skip to content

Templates & NLT

NLT Template Syntax

NLT (Natural Language Template) is Synapse's plain-English templating syntax. Instead of writing code, you write expressions that read like sentences. NLT handles personalization, conditionals, loops, formatting, and more — all designed to be readable by marketing teams without developer help.

Looking for the API? Templates API | NLT Engine Reference | Template Modules API

Quick examples

NLT expressions are wrapped in curly braces. Everything else is plain text or HTML.

What you wantNLT syntax
Contact's name with fallback{the user's First Name, or "there"}
Event attribute{the Order ID from the trigger event}
Currency formatting{the Amount from the trigger event | currency "USD"}
Conditional content{if the user's Plan is premium}VIP content{end if}
Suppress send if missing{the user's Email, required}

Where data comes from

NLT pulls data from three sources. Each has a distinct syntax pattern:

Contact fields

{the user's First Name} — access any standard field or custom property on the contact.

Trigger event attributes

{the Amount from the trigger event} — access data from the event that started this flow.

Named event data

{the Amount from the payment event} — access data from a specific event type in the contact's history.

Templates and environments

Templates are separate per environment. A template created in test mode does not exist in live mode until you clone it. This means you can iterate on email copy and design in test without affecting your production emails.

Cloning a template to live

When a template is ready for production, click the Clone to Live button on the template detail page (or use the API: POST /v1/templates/{slug}/clone).

  • If a template with the same slug already exists in live, it is updated with the test version's content.
  • If no matching slug exists in live, a new template is created.
  • All template versions are cloned along with the template.
Tip: Clone your templates before cloning flows that reference them. Flows reference templates by slug — if the slug does not exist in the target environment, you will see a warning.

Common template patterns

Welcome email

Hi {the user's First Name, or "there"},

Welcome to {the Company Name from the trigger event}! We're excited to have you on board.

{if the user's Plan is premium}
As a premium member, you have access to all features.
{else}
You're on our free plan. Upgrade anytime to unlock more features.
{end if}

Best,
The Team

Order confirmation

Hi {the user's First Name, required},

Your order #{the Order ID from the trigger event} has been confirmed.

{for item in the Items from the trigger event}
  - {item.Name}: {item.Price | currency "USD"}
{end for}

Total: {the Total from the trigger event | currency "USD"}

Syntax reference