Step By Step Guide To Using Email Templates in Salesforce

An email template is a pre-formatted email that you can use to create and send emails quickly. Use email templates in Salesforce to increase productivity and ensure consistent messaging. Email templates with merge fields let you quickly send emails that include field data from Salesforce records like Contacts, Leads, Opportunities, or custom objects. You can use email templates when mass emailing people with List Email or just to send to one person. You can create your own template or use templates created by Admin or your manager.

There are two kinds of email templates in Salesforce:

  1. Classic Email Templates
  2. Lightning Email Templates
Classic Email Templates

You can create four different types of Classic email templates: Text, HTML with Classic Letterhead, Custom, and Visualforce. You can add text, merge fields, and attach files in all these types of email templates. They use Salesforce Merge Language (SML) to insert merge fields. These templates can be used in Workflow Rule, Process Builder, or Flow to send email alerts.

Lightning Email Templates

These are the newer versions of email templates. You can use Enhanced Letterheads with these templates. They use Handlebars Merge Language (HML) for merge fields, which is more flexible than SML. Enable Enhanced Folders and Sharing to organize Lightning Email Templates in folders and manage user access on a folder by folder basis. However, these cannot be used in Workflow Rule, Process Builder, or Flow to send email alerts. At least not now at the time of writing this blog post.

And here is a quick comparison of the features of both email templates

Email Template Builder

This is a new tool that is introduced with the Winter ’21 release. Use it to Create email templates faster and more easily with visual tools. Users can drag elements such as HTML, Rich Text, Button, Image, or Row to create rich, visually appealing email templates. To allow users to access Email Template Builder, create a permission set with Access Lightning Content Builder system permission enabled and assign it to required users. Note: Email Template Builder isn’t available for previously created Classic and Lightning email templates.

Email Templates in Salesforce is a cool, productivity feature that can save tons of time for your users in sending emails. With the introduction of the Email Template Builder, it has become even more intuitive, hence the step-by-step guide to get you started with it. After going through it, you will learn how to:

  • Assign Content Builder Permission to Users
  • Enable Email Template Folders & Enhanced Sharing
  • Create a Lightning Email Template
  • Edit in Lightning Email Template Builder
  • Schedule List Email Using New Template
  • View Scheduled List Emails
  • Create a Classic Email Template
  • Create an Email Alert
  • Create a Process to Send Email Alert
  • Use Classic Email Template

NOTE: Certain sections of the guide will appear as locked in the free preview. You can download the unlocked version of the guide in PDF format by subscribing to our “All Access” Pass through the link below.

Not an “All Access” Pass Member Yet?

Get Download Access to this & 150+ More Step-by-Step Guides with “All Access” Pass. A simple and single plan to access our entire library of courses, guides, workshops & masterclasses on Salesforce.

References & Useful URLs

25 thoughts on “Step By Step Guide To Using Email Templates in Salesforce”

  1. I followed your guide but when i come to insert the template to the list email It isn’t showing in any folder. how do I get around this?
    I checked that it is saved and it definetly has just not appearing when Iwant to insert into the email.

  2. Thanks very much Ashish for this session. In all over world people are great follower of yours.
    I have few questions :
    1. It wont support tag head, meta, title,html,body, and style
    2. No css, only inline Style
    3. In html Body tag, only limited style and background image and colour can be added
    4. As of now my challenge is if else condition in html code
    how to add below :
    if mso , call this style
    .hide-win { display: none !important; overflow: hidden; mso-hide: all; margin: 0; font-size: 0; max-height: 0; }
    if mso 16, call this style
    html, body, table, td, div { font-family: Arial, san-serif !important; }

    in html code, we can not add comment too.
    kindly reply.
    Thank you

  3. How to create an Email template which I can use Account and Contact Standard Object? Thank you.

    1. Hi Carla, In Salesforce’s classic or lightning email template you need to select the object and field and salesforce will show you the merge field syntax for the field, which you will then be able to use in the email template. If you want to display the values from two objects like Account & Contact, one option will be to create a formula field on the contact object, pulling the data from the Account object. The other option will be to use Visualforce Email template where you can get data from different objects but this requires coding.

    1. Hi Neha, technically it is possible but then if you are using merge fields in the template, the value in those fields will not be populated. Can you explain your business requirements a little more in details for using the same template for all standard objects and let me see if I can come up some suggestions?

  4. Hemavathy Rajaguru

    Hi Ashish,

    When I add a Long Text Field to the Email Template, it shows in multiple short lines on the email sent, which makes it difficult to read. Is there a way to make the Text shown in long lines. Does the Field location on the Page layout impact how it displays in the email? Will adding the Field to a new Section with 1 column on the page layout help in any way to display the value of the Field in long lines? Thanks!

    1. Hi Hemavathy, can you attach a screenshot of your template and the email that gets sent from that template. This will give me a better idea about the issue that you are facing.

  5. The Welcome Email when a community user is created is toggled to be off/unchecked. and a workflow is created to send welcome emails only to few users after user gets created, will the templates still populate merge fields ??? I don’t think they will, please help if have any insights.!

    1. Ashish Agarwal

      Hi Rakesh, if the workflow is on User object and is getting triggered after the creation of the record, it should populate the merge fields.

  6. Hi there

    Is it possible within classic email templates to pull in a long text field containing the html you want to render the email with? I have tried and can’t get it to work. Be very helpful to know if this is possible. The code i have will render if I paste it all directly into the classic email template builder but if I am trying to call on it as a field it just displays the html code without rendering, anything I can do about this?

  7. I’d like you to add this to your comparison:

    Ability to send Community/Digital Experience Merge Fields?

    Classic: Yes {!Community_URL}
    Lightning: No, the email is never sent and there is no error.

    Use case: The Welcome Email when a community user is created should have a very log token/url that allows them to set their password the first time.

        1. Ashish Agarwal

          Hi Mei, I don’t think you can use experience cloud site merge fields in lightning email template. As of now you can use merge fields from Contact, User, Organization, and the standard/custom object you are sending the email from. The workaround can be to create a custom formula field in any of these objects and populate the value with the value of experience cloud site merge fields. That may work.

    1. Hi JC. If someone moves out of the list criteria before the scheduled time & date, the email will not be sent to those individuals. Moreover, if new entries get added to the list, the email will be sent to those as well. If you notice the recipient details in the email composer when drafting the email, you see a specific list view instead of any names. Hence, the recipients will be selected dynamically every time as per the filter in the list view. Once the List Email is completed the actual number is shown in the ‘Recipients’ related list of List Email object record. You can then compare the number between the scheduled and actually sent to find out differences if any. Cheers, Ashish

  8. Thank you Ashish – do you know if Lightning Email Templates are due to have compatibility with PBs, Flows, and Workflows in a future release?

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top
Introducing All Access Pass