So I've created the following e-mail template:

enter image description here

And I thought I could just head over to Email Alerts, and next to Email Template, click the icon and find my template:

enter image description here

But of course, in true Salesforce bait and switch fashion for us newer users who have only ever known Lightning, it only supports "Classic Email Templates":

enter image description here

It's my first time hearing about these templates, so I headed over "Email" to check them out, and they seem to be less sophisticated than the "new" e-mail templates. Additionally, it sounds like only administrators can edit them, so that causes problems with what has been requested.

My next attempt to solve this was to use the "Email" action in flows, but that doesn't seem to support using the e-mail templates either. So now I'm stumped.

I've also tried this sample code which uses Messaging.SingleEmailMessage, and this seems to work if I change DeveloperApiName to Name as suggested in the comments on this question.

Is there some other way I can do this that doesn't involve custom Apex code?

  • What issue are you facing when you use invocable apex? It should work just fine even with Lightning Email Template. May 12, 2020 at 11:11
  • @Shailesh The code I linked needs "template api name" but such a field doesn't exist in the templates. I tried the template name "Team Expired E-mail" but this didn't work (the SOQL query failed to find the template). Do I just need to use the record id from the URL for the public email template I have above? May 12, 2020 at 11:39
  • Select ID, Name, DeveloperName from EmailTemplate WHERE Name = 'TestToDelete'. I am getting the ID properly in this SOQL. May 12, 2020 at 12:25
  • @ShaileshPatil OK, so it seems that works. I've no idea why "DeveloperAPIName" was suggested in the sample code I found since that doesn't seem to exist on a template. Thanks. Is there a better way to do this not involving Apex code? May 12, 2020 at 23:53

2 Answers 2


This installable extension from UnofficialSF.com lets you use Lightning Email Templates.

  • Aren't lightning e-mail templates something else? Or have I misunderstood? Are these Lightning templates? May 14, 2020 at 3:20

In Salesforce Spring 21 release updates,

Use Lightning Email Templates in Salesforce Automations

Now use Lightning email templates—including Email Template Builder email templates—in Salesforce automations, including email alerts, Flow, Workflow, Process Builder, Approval Processes, and more. For example, you can set up an email alert that sends an email to users about something that’s happened, and include a Lightning email template with the email alert. Previously, when you set up an email alert you used Salesforce Classic email templates only.

Where: This change applies to Lightning Experience in Essentials, Professional, Enterprise, Performance, Unlimited, and Developer editions.

How: Before you set up an automation with Lightning email templates, read about their behavior in Email Alert Actions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .