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 want | NLT 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.
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 TeamOrder 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
Visual Editor
Drag-and-drop email builder with 20 block types, HTML code view, and preflight checks
Variables
Pull in contact data, event attributes, and named event data
Formatting
Format numbers as currency, dates, percentages, and text transforms
Conditionals
Show different content based on conditions using if/else logic
Lists & Loops
Iterate over arrays to build lists, tables, and repeated content
Math & Calculations
Arithmetic operations, aggregates like sum, average, and count
Filters
Transform text with truncate, replace, join, sort, and 19 other filters
Other Features
Variable assignment, ternary expressions, built-in values, and comments
Template Examples
Real-world templates for common email types