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. {{{Contact.link}}} or {{{CustomObject__c.link}}}

Further reading

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

33 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: https://www.salesforceben.com/category/app-review/appassessor/

      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 https://ideas.salesforce.com/ 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.

  7. I have a weird situation where I have built a number of email templates for my team to use, but they are only pulling merge fields for some teammates, not all. Is there a specific permission set that users need in order to have merge fields populate? Thanks in advance!

  8. There shouldn’t be any additional permissions as far as I am aware, if the template is sending at all. Add the merge field to the page layout and log in as the user to check that they can see the field normally. If they can’t, then it’s a permissions thing. If they can, then it’s time to log a ticket with Salesforce Support team.

    1. You’ll have to experiement, but within the builder, if you click on the main canvas (outside any specific element), on the right hand side you will see Details and Style. Click on Style and within the “Background” option there is a “Select from Files”. Write back and let us know if this works for you!

  9. Merge fields either not appearing or showing blank for preview email on composing the email for cases. What would be the possible reason?

  10. Typically it will be field permissions. Troubleshooting questions to help you navigate are does this work for Admin, but not other users; can you see the field on the page layout; does this work for classic email templates. You can also log a case with Salesforce support and they will be able to guide you.

    And here’s one one place where I recommend anyone else can also ask questions (rather me answer them all here, which isn’t sustainable long term!): https://trailhead.salesforce.com/trailblazer-community/groups/0F9300000001oVpCAI (it’s Salesforce’s Admin Trailblazers group on the Trailblazer Community)

  11. Anyone got an example or confirm if not possible but can you do a conditional statement? Scenario is display name if I have one but fixed text if the display name not populated

  12. Hi Paul,
    I am facing following issues:
    1. Template not visible in email content
    2. When trying to create email content from the Template related tab it throws following errors:
    We can’t save the record. Ensure the provided email template was created using the Email Template Builder and doesn’t contain Salesforce files.

    I build the report in email builder. I used images by saving them in the related tab files of the template.

    Help Appreciated.
    Thanks,

    1. Hi Maninder, can check if below resolves your issues.
      1. When creating the email template, you need to tie the template to a specific object, only then you can use those templates for specific objects. For example, if you specify related entity as contact while creating template in lightning builder, you can access the template to send emails on Contact

      2. When creating template, use upload images to the CMS content and use those images. This should resolve the second issue

  13. Thanks for the detailed info.

    I have a query.. We created templates using lightning template builder, but we are not able to access them via engage emails. We can set template availability while creating templates in classic i.e – One-to-one or List emails….. Emails created as one-to-one are available for engage emails. How do we enable this while creating templates using lightning email builder

  14. When inserting an email template, is it possible for a user to edit the content of an email before sending to a customer. This is showing as locked for the user?

  15. Very helpful article – bookmarked!

    I have the situation that I needed to apply changes to 75+ both Classic and Lightning Email templates.
    To test them I would like to send them to my email address in bulk instead of sending each template manually.

    How could I do this? Any tools or experiences for this?

  16. Hi Paul,

    Thank you for the step by step instructions on how to use the Lightning Email templates. I have followed the above steps in my org(sales cloud) but i’m still not able to see the ‘Edit in builder’ option. Do I need to do something different? Or is it only available in Pardot?

    1. Hi Alicia. You may need to contact Salesforce Help to figure out why this isn’t available for you. You can log a case with this. All the functionality described in this article is available on the core Salesforce platform regardless of whether you have Platform, Sales or Service Cloud licenses.

  17. Hello,

    Excellent article, but I am stuck and need some help.

    The issue I am having is the “Background Image URL” – I add a file and it appears in the Email Template Builder, but when I test and receive the email – It does not display the background. It only shows the “Background Color”.

    I have tried leaving “Background Color” blank and as described in this article and still having issues.

    I am fairly new so I could be missing something.

  18. Thanks, great article! Does anyone know if there’s a way to alter the button shape? Eg to round the corners

Add Comment