1. Home
  2. Postcards
  3. Integrations
  4. How to Upload an Email Template in Salesforce

How to Upload an Email Template in Salesforce

In this tutorial, we’ll be creating a custom HTML email template in Salesforce using a template from Postcards.

We have released new email templates for Salesforce.

Prerequisites

  • A Designmodo account
  • A Salesforce account
  • A text editor that can open HTML files

Video Version

https://www.youtube.com/watch?v=YkZLtqGDS_o
Video from Postcards 1, the article contains updated information and functionality.

Steps

1. Create an email template in Postcards and add Salesforce merge fields

The first thing we need is a Postcards template with Salesforce merge fields added to it. We want to add the merge fields in this step so we don’t have to edit the code later.

The tag we will be adding is the first name tag and it looks like this:

{!User.FirstName}

For more information about merge fields visit this link.

In the Postcards app, I’ve created a template that consists of a Header 7, Content 4, Feature 5, Call to Action 1, and Footer 1. It looks like this:

How to Upload an Email Template in Salesforce

We’ll be adding the first name merge field to the title of the Header.

Click the Header area and that’ll open up a side menu:

Postcards and Salesforce

Click the “Title” subsection and then add the first name merge field to the text area.

Email text area

Press “Done” in the top left corner of the side menu and now we have everything we need for our template.

Press the “Export” button in the top right corner of the app and then select “Download as zip.”

Export

Make sure you have the “Host images online” option selected so you don’t have to manually upload the images yourself.

Host images online

Download the zip and extract the index.html file into a folder you can work with. It should look something like this:

Index.html file
I

2. Create a custom email template in Salesforce

On your Salesforce dashboard, click the gear icon in the top right corner of the page and then select “Setup.”

Create a custom email template in Salesforce

On the next page, on the left side menu, click open the “Email” option and then select “Classic Email Templates.”

Classic Email Templates

On the Classic Email Templates page, select “New Template.”

New Template

On the next page, select “Custom (without using Classic Letterhead)” and then press “Next.”

Classic Letterhead

On the next page, fill out the form with the values you want to use.

Make sure you have the “Available For Use” option checked.

For encoding, select “Unicode (UTF-8).”

And then press “Next.”

Unicode (UTF-8)

The next page is where you’ll paste in the HTML code from the Postcards template.

HTML code from the Postcards template

Open your index.html file you downloaded from Postcards earlier in a text editor.

I’m using Visual Studio Code so my file looks like:

Visual Studio Code

Copy everything in this file and paste it into the text editor on the Salesforce page and then press “Next.”

Salesforce

The next page will be where you can create a text only version of your email if the recipient cannot receive HTML emails. Once you have filled out this value, you can press “Save.”

HTML emails

At this point, your email template is ready to go!

3. Send yourself a test email

To send yourself a test email, press “Send Test and Verify Merge Fields.”

Send yourself a test email

Then check “Send email preview to:” and add your email. Then press “Ok.”

Send email preview

I sent myself a test email and it looks like this:

Email Preview

What we covered

  1. How to create a Postcards template.
  2. How to add merge field values to the template.
  3. How to export a Postcards template.
  4. How to create a custom HTML email template in Salesforce using a Postcards template.
Updated on May 20, 2024
Was this article helpful?

Related Articles