Skip to content

Write Your First Template

Email templates in Synapse use NLT (Natural Language Template) syntax -- a plain-English way to personalize emails. Instead of writing code, you write something that reads like a sentence. This guide shows you how to create a simple personalized email template.


Step 1: Create a New Template

  1. In the dashboard sidebar, click Templates.
  2. Click Create Template in the top right corner.
  3. Fill in the basic details:
FieldExampleDescription
NameWelcome EmailA friendly name for your team
SubjectWelcome to our platform, {the user's First Name}!The email subject line (supports NLT)
From NamePYRX SupportThe sender display name
From Email[email protected]Must use a verified sender domain
Reply To[email protected]Optional reply address

Step 2: Write the Email Body

The editor has two panes: the HTML editor on the left and a live preview on the right. As you type, the preview updates in real time with sample data.

Here's a simple template to start with:

<p>Hi `{the user's First Name, or "there"}`,</p>
 
<p>Welcome to our platform! We're glad to have you on board.</p>
 
<p>Your account is now active and ready to use.</p>
 
<p>Best regards,<br/>The Team</p>

Step 3: Add Personalization

NLT expressions are wrapped in curly braces { }. Here are the most common patterns:

Pull in a Contact's Name

`{the user's First Name}`

This inserts the contact's first name. If the contact doesn't have a first name on file, it will show as blank.

Add a Fallback Value

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

If the first name is missing, "there" is used instead. So the greeting becomes "Hi there," which is much better than "Hi ,".

Use Trigger Event Data

When your template is used in a flow, you can pull data from the event that triggered the flow:

`{the Order ID from the trigger event}`
`{the Reference Number from the trigger event}`
Tip

Use the Variable Picker in the template editor to browse available fields. Click a variable to insert it into your template without having to remember the exact syntax.


Step 4: Add a Simple Conditional

You can show different content to different people. For example:

`{if the user's Plan is premium}`
<p>As a premium member, you have access to priority support.</p>
`{else}`
<p>Upgrade to premium for priority support and more features.</p>
`{end if}`

The conditional checks the contact's data, and only shows the matching section.


Step 5: Preview and Test

  1. Click the Preview tab to see your template rendered with sample data.
  2. Use the Test Data panel to change sample values and see how the template behaves with different inputs (missing names, different plans, etc.).
  3. Click Send Test Email to send a real email to your own address and verify it looks right in your email client.
Warning

Always send a test email before using a template in a live flow. Email clients can render HTML differently than the preview pane.


Step 6: Save and Publish

  1. Click Save Draft to save your work without making it available to flows.
  2. When you're satisfied, click Publish to make the template available for use in flows.
  3. Published templates are versioned -- if you edit a published template later, a new version is created.

Common Patterns

Here are a few patterns you'll use often:

Greeting with Fallback

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

Required Data (Suppress Email if Missing)

Your reference number is: `{the Reference Number from the trigger event, required}`

If the reference number is missing, the email is not sent at all -- preventing incomplete or confusing messages from reaching the contact.

Formatting Numbers and Dates

Amount: `{the Amount from the trigger event, as "currency"}`
Date: `{the Created Date from the trigger event, as "long date"}`
Note

For a full reference of NLT syntax including loops, filters, math, and more, see the Templates & NLT section of the Help Center.


Next Steps

Now that you have a template, you can:


Looking for the API?

If you prefer to create and manage templates programmatically, see the Templates API Reference.