Previously, if you wanted to use classic or lightning email templates in Salesforce Flow, you needed to create “Email Alerts.” These alerts, typically associated with Workflow Rules, were then used in the Flow. Alternatively, you could use the “Send Email” action in Flows and rely on a “Text Template” resource to define the email’s body. But those days are gone!
With Summer ’23 release, you can now directly use classic or lightning email template in Salesforce without the need to create email alerts. And if your email template has merge fields, you can use the recipient record or a related record to populate the merge fields.
But that’s not all. You can now also log the email as an activity on the related records. For example, if you are sending an email related to a case, you can log the email as an activity on the case record and this email will also appear on the contact record giving your users a complete picture of all the emails that were sent using Salesforce flows. This was a widely requested feature on IdeaExchange.
Here is a step-by-step guide on how to use a classic and a lighting email template directly in Salesforce Flows and how to log it as an activity on the related record. Won’t take more than 5-7 minutes to skim through the guide to understand how this works and 15-20 minutes if you want to try it out yourself. Take a look.
Introducing Mastering Salesforce Flows Training Course
Liked this post? We are now offering a complete self-paced, video-based training course on Mastering Salesforce Flows. The course comes with downloadable step-by-step PDF guides, unlimited access, free upgrades, community discussion area, free preview and more. For more details, please click here.
Need Help with Flows?
Need advice on Flows? I also offer advisory & consulting services on Salesforce Flows. So, whether you want to create new Flows or migrate existing automations (Workflow Rules, Process Builder, Triggers) to Flows, I can help you analyze, design, plan & review. To initiate a discussion, please submit the contact form here stating your requirement or schedule a discussion at this URL.
References & Useful URLs
- Related Summer ’23 Release Note Article – Use Email Templates in the Send Email Action
- Related Summer ’23 Release Note Article – Log Emails Sent with the Send Email Action
Could you make the same scenario on lead object without lookup to the contact object and with the help of email templates
Hi Dilip, the process for using it with lead object will be quite similar to what I have shown in this guide. As of now there are no plans to create another guide for the lead object.
Hi Ashish,
I’m encountering this error message.
Error Occurred: insufficient access rights on cross-reference id
Salesforce Error ID: 475610917-20156 (-2036922204)
Hi Lakshmi, one thing that you can check is the folder where this email template is stored and whether the user has access to that folder.
Is it possible to log an entire email (body + template + images + letter head) in the activity
Hi Roshan, whatever email is being sent out from Flow should be logged as an activity. Since this is just a toggle in Flow, we do not have explicit control on what is logged in the activity. Are you not seeing the entire email being logged?
Hi Ashish,
Thanks for a wonderful tutorial for one of the top features of summer’23 upgrade.
I tried using this – guestbook page of experience cloud site creates a new contact, upon creation of a new contact I want to send email template via the flow.
I was trying out this summer 23 flow feature to send an email to a newly created contact but it ran successfully first time (both lightning and classic email template) but subsequent times I didn’t see the email in my inbox but I do see the emails logged in activity feed of the records.
Do you know why this is happening?
The new contact should receive the email with next steps.
Will appreciate your help to resolve this.
Many thanks,
Sheeba
Hi Sheeba, thanks for your feedback. Here are a couple of things you can do to investigate and troubleshoot:
1. Check your spam folder and ensure that the email hasn’t landed there
2. Run the flow in debug mode and review the debug details to see if it indicates any problem
3. Review the email log to find out whether the email was sent or not. You can download the email log by navigating to “Email Log Files” under setup.