Skip to content
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.

Latest commit

 

History

History
42 lines (30 loc) · 1.13 KB

create-dynamic-template.md

File metadata and controls

42 lines (30 loc) · 1.13 KB

Create a dynamic template in Sendgrid

Go to https://sendgrid.com/dynamic_templates, then click the "Create Template" button.

Then type a name, here we choose "onboarding_next_step", then click "save"

Create a dynamic template

So you get there:

Add a version

Where you will click the "Add version" button.

Make sure to choose "Code editor", then click on "Continue"

Select Code editor

Copy this snippet in the "Test data" tab:

{
  "name": "Antoine",
  "agent_installed": true,
  "subject": "What are the next steps ?"
}

Add some test data

Then copy this snippet to the "Code" tab:

<p>Hi {{ name }},</p>

{{#if agent_installed }}
Look at our real-world example ...
{{else}}
Have you seen our tutorial ?
{{/if}}

Paste the mail template

Last settings, click on the "Settings", on the left bar to setup the mail template name and the subject. Set the subject as variable