Your Complete Guide to Salesforce Lightning Email Templates

Share this article...

Do you like receiving plain text emails from businesses, or does it look a bit shabby? Salesforce comes to the rescue with Lightning Email Templates. Using the Lightning email builder, built on the Salesforce platform, you are able to insert fields into email templates (mail merge) from a record in Salesforce to use across a range of use cases (e.g. for sales emails, renewals, case updates).

You and your users can use the Lightning Email Template Builder directly (providing they use Lightning). It works with merge fields in email alerts, Workflow, Process Builder, Flow, Approval Processes and more. It’s better, and much more modern than Salesforce Classic Email Templates, and is also the same builder that’s been rolled out across many other Salesforce platform products, such as Pardot.

In this article, we’ll look at how to set up Lightning Email Templates (note: they are not enabled by default!) Then we will dive into its key features, what it looks like in practice and its limitations.

Great news: it’s easy to update existing Email Alerts to use a new Lightning email template, you just need to edit the Email Alert and point it to the new Lightning email template.

How to Enable Lightning Email Templates

This is a two-part process (perhaps try it in a sandbox first!).

Part 1: Enabled Template Folder Sharing

This part is not mandatory, just very helpful to all your users, so they can share and access email templates amongst themselves.

  1. Go to Setup and search for “Lightning Email Templates”
  2. Switch “Folders and Enhanced Sharing” to on (see screenshot below)

Part 2: Enable Content Builder

  1. Create a new Permission Set (e.g. “Lightning Email permission set”)
  2. Go to System Permissions

3. Tick “Access drag-and-drop content builder” (this controls whether the “Edit in Builder” button appears later on)

4. Save

5. Apply to users as appropriate

6. Wait 15 minutes*. If you don’t see “Edit in Builder” when using the Template Builder in the next section, then your system still hasn’t been updated

*or log out and back in again, this is to avoid the Lightning delay!

Create Email Templates in Salesforce Lightning

  1. Click on App Launcher (the 9 dots, in the top left hand corner) and search for Templates in the App menu. Apparently, it’s been there for a while, but this is the first time that I’ve noticed it!

2. Create a new template. Here you put in the “metadata” for the email, such as the subject line, which object it relates to (if you want to merge field data into it) and where it should be saved. The body of the email comes soon, but not quite yet!

3. The next screen will have an “Edit in Builder” button. Click it!

4. Once in the email screen itself (which we’ll fully explore in the next section), you will probably want to update the background color as your first action item. If grey is your thing, then leave it alone, but for everything else, go to Style (on the right), click the color selection box and change it to #FFFFFF or 255, 255, 255 to reset the background to white.

Add images to email templates in Salesforce Lightning easily by dragging an image component from the left-hand sidebar on to the email canvas.

5. Welcome to the Lightning Email Builder!

Lightning Email Builder: Key Features

You’ll recognize the layout of the Content Builder. On the left-hand side are the drag and drop components. The exciting part is that there’s clearly scope for new elements to be added over time.

On the right-hand side, the properties/details of each component can be adjusted, such as merge fields for rich text, image location (which you can directly upload), or color, margin, and image width in the “Style” subsection.

Press “Save” and then you’re ready to use the email template!

How Does it Work?

As discussed, you can use these in an Email Alert or end users can use them directly within Salesforce when creating an email. At the bottom of the email screen, there’s the insert, create or update template button, which users can click to select the template that they want.

And, with that previously mentioned – but avoidable – default grey background creeping in at the sides, here’s the final result, when received and seen on mobile:

Lightning Email Template Limitations

  • Merge fields are resolved for most activity-enabled objects – the exception is that merge fields are not yet available for Contact and Lead objects (this is on Salesforce’s roadmap)
  • You cannot edit classic email templates in the Content Builder; you have to create new Lightning email templates. However, updating an Email Alert is simply a matter of editing the Email Alert, pointing and clicking and selecting the new Lightning email template
  • Cross-object merge fields still aren’t supported (though there’s a long-standing, popular idea that Salesforce are very much aware of)
  • Lightning Email Template Content Builder is not as powerful as Marketing Cloud’s Email Studio
  • Some Classic Template functionality is missing, such as:
    • Send Test and Verify Merge Fields (please vote for the idea here!)
    • Record Type Name. This field needs to be recreated as a Formula Field; using the RecordType field gives the Record Type ID instead
    • Details Link (the ability to insert a link directly to the record, which is very useful for internal email alerts). The merge field you need to type is “.link” e.g. {{{}}} or {{{}}}

Further reading

Finally huge thanks go to Johann Furmann and Justyna Krajewska for their input on this article 💝.

14 thoughts on “Your Complete Guide to Salesforce Lightning Email Templates

  1. I am a System Admin and created a Lightning Email Template with the Template Builder. I saved the template in the Public Email Templates folder, but when I try to insert a template it does not appear in the list of available templates. I checked My Templates, All Templates, Private Email Templates, and Public Email Templates and nothing.

    1. I had this issue too Tom, in my case I realised it was because I had selected the ‘Related Entity Type’ as Opportunity, but I was trying to email from a Contact. When I went back to the template and saved ‘Related Entity Type’ instead as –None– it then would appear under templates in the email on the Contact.

  2. Does Lightning template support emailmessage object ? For example if I need to set the subject of the template as the Value from the subject field from EmailMessage Object ? Something like this {{{EmailMessage.Subject}}} .

    Thanks in advance .

  3. I am new to Salesforce and am learning as I go. I have created a lightning email template that is connected to email alerts. I am creating a flow that will send a schedule-triggered email every day to people whose membership to our organization will expire in 30 days. I have the custom objects created and the flow rules set up to only send to those whose membership hits the 30-day window each day.

    My issue is the merge fields from the template are not working in Flow. I get an error every time I have a merge field in the template, regardless if the merge is for the recipient or account. The flow does not recognize the field. Is there a way to make this work? I would like to personalize the email as much as possibe.

  4. Does this email template builder have a specific program name? Such as how Draw Loop, Lightning template builder, Mail Chimp… etc all have different identifying names. If it doesn’t how are we supposed to find specific answers when looking up this template?? Also, I can see it doesn’t support cross-object field merging, but what about related/child object merges? For example if I was making an estimate template in HTML body using this builder, would I be able to use both an estimate object and its related estimate line object to make an estimate line merge table? I think this is possible in Draw loop, but if I don’t have the purchased software I can’t use it unless I attach a document. Is there any work around without having to buy Draw Loop?

    1. The Lightning Email Template Builder is a native part of Salesforce – it is not an external add-on such as Draw Loop.

      Tables pulling data from child objects are not supported, although Salesforce are aware of the Communities’ desire for such a function. There are other programs, but generally they all have a cost, and different benefits. AppExchange has more, and the SalesforceBen AppAssessor has also reviewed some:

      1. Thank you for the reply and the link, I also have a question about merge images, as I can view them in the email preview before it’s sent, but the merge image is no longer visible in my gmail inbox after sending the email template. Also I have a checkbox that is showing a 1=yes and 0=no instead of YES/NO like it does in SDocs. Does anyone know how to solve these issues?

        1. You can log a ticket via Salesforce Help and they will be able you out with these specific problems. That said, just because functionality exists in SDocs, that doesn’t necessarily mean it is supported by Lightning Template Builder as they are two different products, made by different companies.

  5. Thanks for putting this together. In Classic we relied heavily on enhanced letterheads. Is there an equivalent functionality in Lightning’s Builder? Essentially, we need to be able to update the banner image at the top of an email en masse so that ALL email templates have the image component (or equivalent) updated at the same time rather than manually going through each template. Is this possible? When I’ve tried using enhanced letterheads in Lightning the “edit in builder” option isn’t available.

    1. Not yet supported – one option would be to look on the all new/revamped IdeaExchange and see if there is an existing request, or post a new one. An alternative is hosting the image externally (e.g. on the company website) and pointing people to that image, which you can update whenever you want.

  6. I’m new to Pardot and am trying to figure out if I can update the email canvas size in the Lightning Email builder when creating templates. I have a few email templates that require a wider canvas. Thanks

    1. The idea behind the Lightning Template Builder is that the emails are responsive (to mobile/desktop/etc). If you set a specific canvas size, then that loses the responsive element. That said, you can try by hard coding the values in HTML but I don’t recommend it.

Add Comment