How to Create Email Templates in Salesforce (2026 Guide)

Create email templates in Salesforce Lightning step by step, use merge fields, find where your templates live, and see how Classic templates differ.

How to create email templates in Salesforce

How to Create Email Templates in Salesforce: Lightning and Classic

The short answer: to create an email template in Salesforce, open the App Launcher, go to Email Templates, and click New Email Template. That same page is where your saved templates live. Templates made in Salesforce Classic are the exception: you'll find those in Setup, under Classic Email Templates.

Still typing the same follow-up, meeting confirmation, or pricing email from scratch every week? An email template fixes that: you write the message once, and Salesforce fills in each recipient's name and company every time you send it.

Before you build one, know this: Lightning and Classic keep templates in different places and write merge fields differently, and how you set up a template decides where it shows up in the email composer.

Here's how to create one in Lightning, fill it with merge fields, share it through folders, and handle the Classic templates your org may still use.

No time to read the whole guide? Start with these five points:

  • In Lightning, you create templates from the Email Templates page or straight from the email composer on a record.
  • Lightning templates use merge fields with three curly braces, like {{{Recipient.FirstName}}}. Classic templates use {!Contact.FirstName}.
  • A template related to an object such as Account only shows up when you email from that object. Set Related To to Contact, Lead, or nothing to use it anywhere.
  • Lightning can use Classic templates, but Classic can't use Lightning templates.
  • Custom HTML templates can only be created in Salesforce Classic. In Lightning, you add HTML through the template body's source view.

What is a Salesforce email template?

If you've used email templates in another tool, Salesforce won't be much different: a template is a saved subject line and body that you insert into a new email. Its merge fields pull data from your records, so each recipient gets their own name and company. You can use one for a single email, a list email, or a mass email.

In Lightning Experience, a new template is private until you share it, for example by saving it to a public folder or one you've shared with your team. Lightning templates are available in Essentials, Professional, Enterprise, Performance, Unlimited, and Developer Editions, and Classic templates in all editions.

Types of email templates in Salesforce

Salesforce has two families of templates: the ones you build in Lightning Experience, and the four older types from Salesforce Classic. If your org runs on Lightning, start with a Lightning template. Classic templates still matter for some automations: Salesforce Help says the ones used with Web-to-Lead, Email-to-Case, assignment rules, and auto-response rules must be public and active.

Template typeWhere you create itWho can create itWhat it's for
Lightning email templateEmail Templates page, or the email composer on a recordLightning Experience usersEveryday emails with merge fields, images, HTML, and attachments
Email Template Builder templateEmail Templates page, then Edit in BuilderUsers with the Access Drag-and-Drop Content Builder permissionDesigned emails built from drag-and-drop components
Text (Classic)Setup, Classic Email TemplatesAll usersPlain-text emails
HTML with Classic LetterheadSetup, Classic Email TemplatesAdmins and users with Edit HTML TemplatesBranded emails where the letterhead sets the logo, colors, and text style
Custom HTML (Classic)Setup, Classic Email TemplatesAdmins and users with Edit HTML TemplatesEmails built from your own HTML code, without a letterhead
Visualforce (Classic)Setup, Classic Email TemplatesAdmins and developers with Customize ApplicationAdvanced merging, such as pulling data from several records into one email

Important: Email Template Builder needs Professional Edition or higher, so Essentials orgs won't have it. Classic HTML and Visualforce templates aren't available in Personal Edition.

If you're looking for Marketing Cloud templates, that's a separate product. In Marketing Cloud Engagement, you create templates in Content Builder, either by pasting HTML or with a layout tool.

How to create an email template in Salesforce Lightning

You can create a Lightning template in three ways: from the Email Templates page, from an email you're writing on a record, or in Email Template Builder. Folders, shared templates, and the drag-and-drop builder need a little setup first.

Before you start: what your admin may need to switch on

None of these settings are required for a basic private template. Your admin only needs them for the features named below.

  1. If you want folders for templates, your admin goes to Setup, enters Email Templates in Quick Find, selects Lightning Email Templates, and turns on Folders and Enhanced Sharing. This needs the Customize Application permission and Professional Edition or higher. Users other than admins also need the Create Folders for Lightning Email Templates permission to make folders.
  2. If you want to create, edit, and save public templates, you need the Manage Public Lightning Email Templates permission.
  3. If you want to use Email Template Builder, your admin opens Permission Sets in Setup, selects Access Drag-and-Drop Content Builder under System Permissions, and assigns that permission set to you.
Enabling Folders and Enhanced Sharing for Lightning email templates in Salesforce Setup
Enabling Folders and Enhanced Sharing for Lightning email templates in Salesforce Setup

Create a template from the Email Templates page

  1. Open the App Launcher, search for Email Templates, and open it.
  2. Click New Email Template.
  3. Enter a name and a subject.
  4. Optionally, set Related Entity Type to limit the template to one object, such as Opportunity. Leave it empty if you want to use the template from any record.
Creating a new email template in Salesforce Lightning, setting the Related Entity Type
Creating a new email template in Salesforce Lightning, setting the Related Entity Type
  1. Optionally, pick an Enhanced Letterhead to add your standard header and footer.
  2. Write the body in the HTML Value area. Use the toolbar to style text, add images and attachments, and click the merge fields icon to insert merge fields.
  3. Click Save. You can also save the details first and write the body later.
Writing the email body in the HTML Value editor of a Salesforce email template
Writing the email body in the HTML Value editor of a Salesforce email template

Save an email you're writing as a template

  1. Open a record that supports email, go to the Activity tab, and click Email.
  2. Write the email, or start from an existing template. Type any merge fields you want in the subject by hand.
  3. Click the merge field icon to insert merge fields into the body from the merge field picker.
  4. Click the Templates icon and select Save as new template.

A template with attachments can't be copied with Save as new template in the composer. Use Clone on the Email Templates page instead.

Saving an email as a new template from the Salesforce email composer
Saving an email as a new template from the Salesforce email composer

Build a designed template in Email Template Builder

  1. On the Email Templates page, click New Email Template, fill in the window, and click Save.
  2. On the template's details page, click Edit in Builder.
  3. Add components to the canvas and adjust each one in the properties panel.
  4. Click Save, then click the Back icon to return to the Email Templates page.

You can't change the subject inside the builder. Set it on the template's details page, and type any merge fields in it by hand.

Pro tip: before you share a new template, send yourself a test email. Salesforce Help suggests this for builder templates, because each email app and device can show the same design differently.

How merge fields work in Salesforce email templates

A merge field is a placeholder that Salesforce swaps for real record data when you use the template. Write {{{Recipient.FirstName}}} once, and every email greets its reader by their own first name. Pretty handy, right?

Lightning and Classic templates write merge fields differently, so check which kind you're editing before you copy a field over:

TemplateMerge languageHow a field looks
Lightning templates created since Summer '18Handlebars Merge Language (HML)Three curly braces: {{{Recipient.FirstName}}}
Classic templates and older Lightning templatesSalesforce Merge Language (SML)One curly brace and an exclamation mark: {!Account.Name}

A few HML fields worth knowing:

  • {{{Recipient.FirstName}}} inserts the recipient's first name. One recipient field works for contacts, leads, and person accounts, though not every field exists on all three.
  • {{{Sender.Signature}}} inserts the signature you set up in My Email Settings. The merge picker lists it as Email Signature.
  • {{{Account.Id}}} inserts the related account's ID, which you can use to build a link to the record.

How to insert a merge field

In a template body, click the merge fields icon, pick the field in the merge field picker, and click Insert. In the email composer, use the merge field icon. The subject line has no picker, so type subject merge fields by hand.

Inserting a Recipient First Name merge field into a Salesforce email template
Inserting a Recipient First Name merge field into a Salesforce email template

Example: a follow-up template with merge fields

Here's a simple follow-up you can save as a global template, with Related To left empty, so it works from any contact or lead:

Subject: Following up on our call, {{{Recipient.FirstName}}}

Hi {{{Recipient.FirstName}}},

Thanks for taking the time to talk today. Here's a quick recap of what we discussed and the next steps on my side: [add your recap].

If it helps, I'm happy to set up a follow-up call with your team.

{{{Sender.Signature}}}

A merge field can only fill in what's on the record, so a lead with no first name or company leaves a gap in your email. If you find prospects on LinkedIn, Hublead adds them to Salesforce in one click, with their name, job title, company, and LinkedIn URL already filled in (Professional plan and up).


Related To decides which fields you can use

The Related Entity Type you set on a template controls both where it shows up and which fields it can merge:

  • Related to an object such as Account or Opportunity: the template can use that object's fields, but only works when you email from that kind of record.
  • Related To left empty, or set to Contact or Lead: the template is global. You can use it from any record, but only with global merge fields.

If a field you need isn't in your picker, here are two things you can do to fix it:

  1. Make sure the template is related to the object that field belongs to.
  2. If that doesn't solve the issue, the next step is to ask your Salesforce admin whether field-level security hides it from your profile: they can give you Read Access to the field in Object Manager, under Set Field-Level Security.

Where to find and manage your email templates in Salesforce

Lightning templates are on the Email Templates page: open the App Launcher, search for Email Templates, and select it. The list view shows the Lightning templates you can access, and each row has Edit, Clone, and Delete actions, depending on your permissions.

The Salesforce Email Templates page with Edit, Clone and Delete actions
The Salesforce Email Templates page with Edit, Clone and Delete actions

Classic templates live somewhere else. If you can edit public templates, go to Setup, enter Email Templates in Quick Find, and select Classic Email Templates. If you can't, look in your personal settings under Email Templates or My Templates.

Organize templates in folders

Once Folders and Enhanced Sharing is on, click New Folder in the upper right of the Email Templates page, enter a Folder Label, and save. A few rules decide who sees what:

  • Templates take their sharing from the folder they're in, and subfolders take it from their parent folder.
  • Sharing a folder shares every template and subfolder in it, including templates you add later.
  • Folder names must be unique across Lightning and Classic.
  • Classic templates can't be saved to Lightning folders, and Lightning templates can't be saved to Classic folders.

Use a template in an email

Start an email or a list email, click the Template icon in the composer, and pick the template. Merge fields fill in from the recipient and the record you're on.

Use a template in an email alert

An email alert sends a template automatically when a flow, approval process, or entitlement process runs. You can pick a Lightning or a Classic template, but they don't behave quite the same way.

In a Lightning template, merge fields only fill in for activity-enabled objects plus Contact and Lead, and cross-object merge fields don't work. In a Classic template, special merge fields such as {!this} or {!$Setup.LabelName} aren't supported.

  1. In Setup, enter Email Alerts in Quick Find and select Email Alerts.
  2. Create a new alert and enter a Description and Unique Name. Pick the Object if you want to use its merge fields.
  3. Select your Email Template.
  4. Choose the Recipient Type and Recipients. Add up to five Additional Emails if needed, and set the From Email Address.
  5. Save the alert, then add it to your flow or approval process.

Two more rules apply to both template types. The Recipient merge field doesn't work in automations at all. And your org can send up to 1,000 alert emails per day for each standard Salesforce license, or 15 in Developer Edition and trial orgs.

Why a template is missing from the composer

If a template you made doesn't show up when you write an email, check these three things:

  1. Check the template's Related Entity Type. In the global email composer, a template only appears if it's set to Contact, Lead, or None. Edit the template, set it to None, and save.
  2. Check who owns it. Other people's private templates don't show up for you, so ask the owner to move the template to a public or shared folder.
  3. Check whether it's a Classic template. Those don't appear on the Lightning Email Templates page, so look for them in Setup under Classic Email Templates.

Salesforce Classic vs Lightning email templates

The rule to remember is one-way: Lightning can use Classic templates, but Classic can't use Lightning templates. So if your org has moved to Lightning, your old Classic templates still work in the email composer. You just can't edit them there, because Classic templates are only editable in Setup, under Classic Email Templates.

How much you can change when you send a Classic template from Lightning depends on its type:

Classic template typeWhat you can edit in the Lightning composer
TextSubject and body
Custom HTMLNothing, except in case emails in the Case feed
HTML with Classic LetterheadThe subject; the header and footer stay locked
VisualforceNothing: it's read-only and sends with its attachments

Two more differences to keep in mind. Merge fields in a Classic template fill in at the moment you insert it, so changing the recipient afterward won't update the text, and any field that can't be filled is left blank. And externally linked CSS files won't style the email in most email clients, even if the preview looks right.

How to create an HTML email template in Salesforce

In Lightning, you don't need a separate template type for HTML. Open the template body in source mode and paste or edit the HTML there. Lightning templates support the head, meta, title, and style tags, though Email Template Builder templates don't. Because some email clients ignore the style tag, inline styles are the safer choice.

A Custom HTML template, on the other hand, can only be created in Salesforce Classic. You need the Edit HTML Templates permission:

  1. In Setup, enter Email Templates in Quick Find and select Classic Email Templates.
  2. Click New Template, select Custom (without using Classic Letterhead), and click Next.
  3. Choose a folder, select Available For Use, and enter a template name and subject.
  4. Paste your full HTML source into the body. To use images, upload them to the Documents tab and link to them by URL.
  5. Leave the text-only version blank so Salesforce builds it from your HTML, then click Save.
  6. Click Send Test and Verify Merge Fields to preview the template with real record data.

Once you've used a Custom HTML template in an email, you can't edit its content anymore, so test it before it goes out.

Creating a Custom HTML email template in Salesforce Classic
Creating a Custom HTML email template in Salesforce Classic

Salesforce email template limitations

Salesforce limits email templates in a few different ways: subject line length, file size, the number of templates, and how much you can put into Email Template Builder. Here's each limit with what it counts.

What's limitedLimit
Subject line, Classic templates 230 characters
Subject line, Lightning templates1,000 characters, per Salesforce's developer reference
File size of text, HTML, custom HTML, Lightning, and Email Template Builder templates384 KB (kilobytes) per template
Template size: Visualforce1 MB (megabyte) per template
Templates in free orgs, such as Developer Edition500 templates in total, all types combined
Components per Email Template Builder template250 components
Components per region in Email Template Builder100 components
Characters per component property value10,000 characters

Keep these restrictions in mind as well:

  • Lightning templates can't be used in Salesforce Classic.
  • Email Template Builder templates aren't available in the Outlook and Gmail integrations or in Experience Cloud, can't be created through the API, and can't use enhanced letterheads.
  • Quick Text doesn't work with HML templates, only with SML templates and Lightning templates created before Summer '18.
  • Clicking Format in an HTML component of Email Template Builder can push it past the 10,000 character limit, and then you can't save. Undo the formatting, or split the HTML into a second block.

FAQs about Salesforce Email Templates

Can I attach files to a Salesforce email template?

Yes. In Lightning, you can attach a file to a template if you have access to that file and Edit rights to the template's folder. Attachments on Classic templates are read-only when you send from Lightning, so you change them in Setup, and they must be stored in Salesforce Files.

Where can I see email templates other people made?

Only in public folders or folders shared with you. You can't see other users' private templates, unless you have the View All Data permission, which lets you see them but not change them.

Can I use Salesforce email templates in Outlook or Gmail, or other email apps?

In Outlook and Gmail, yes: Lightning templates work with the Salesforce integrations for both on Professional Edition and higher, though attachments, inline images, and Email Template Builder templates don't come through.

Salesforce doesn't offer the same integration for other email providers, at the moment, so there you'd use your templates from the email composer in Salesforce. Those emails go out through Salesforce, or through your company's mail server if your admin sets up Email Relay.

Who can delete a Lightning email template?

The owner, anyone with Edit access to the template's folder, and users with Modify All Data. For templates in public folders, the Manage Public Lightning Email Templates permission works too.

What happens if our admin turns off Folders and Enhanced Sharing?

Users lose access to the folders they created and to the templates inside them. Turning the setting back on gives that access back.

Can I use my template in a Sales Engagement cadence?

Yes, as long as the rep running the cadence can access it. Salesforce Help recommends keeping cadence templates in the public folder.

Start More Conversations With These 15 LinkedIn Openers

Free guide

Start More Conversations With These 15 LinkedIn Openers

Get a response from prospects with these proven LinkedIn openers.

See your CRM on
every LinkedIn profile.

Install the extension, connect HubSpot, Salesforce or Attio, then open a profile. You see right away whether the person is in your CRM.

Free to start, no card needed.