Product emails

Sendgrid

To create a new email in Sendgrid, follow these steps:

  1. Acess Sendgrid. If you don’t have access to it in your Okta dashboard, ask Support.
  2. Go to Email API > Dynamic Templates
  3. Create a duplicate of our template “New Brand Template - USE TO DUPLICATE”.
  4. Edit this new copy of the template to match what you need.

How to edit an email in Sendgrid

Email templates are written in HTML. To edit them, you need to edit the code, adding the block of code you need for whatever you want to add.

Adding an H title:

<h2>This is your title</h2>

Adding a line break (enter):

After this sentence, comes a line break. <br>

Adding a bulleted (unordered) list:

<ul>

<li> This is the first item of your list </li>

<li> This is the second item of your list </li>

</ul>

Adding a numbered (ordered) list:

<ol>

<li> This is the first item of your list </li>

<li> This is the second item of your list </li>

</ol>

Adding body text:

Just write the text where you need it, no need for extra code.

Variables

Anything that we want to have as dynamic in our email needs to be written as a variable. For example, the recipient first names, specific schedules, individual notes, etc.

There’s a list of available variables in Sendgrid under “Test Data”.

You can add more if you need to, but:

  • Don’t create a new variable if one already exists for this type of copy
  • Use the same formatting
  • Use clear names

Adding a conditional variable:

This means the variable will only appear if there’s something to populate it with.

{{message_from_manager_log}}

Adding a conditional block with variables:

Conditional blocks appear only if the conditions are met. For example, we could say: “If this request has a note attached, then add a title that says ‘Note’ and show the note. If it doesn’t, then don’t show anything.”

They can have both hardcoded text and variable text inside of them.

  1. Open your conditional block
  2. Add the hard coded text, if any
  3. Add the variable text, if any
  4. Close your conditional block

Example:

This creates a block that appears if there’s a manager log message. When it appears, it brings the hardcoded word “Message” as well as the text of the message, stored in the variable.

{{#if message_from_manager_log}}

Message

{{message_from_manager_log}}

{{/#if}}