When it comes to sending emails from a Flow in Salesforce, there are three options to choose from: using an existing “Email Alert” action, the “Send Email” action, or the “Send Email with Email Template”. Each method has its own benefits and considerations, so let’s dive into the details to help you make the right choice for your needs.
1. Email Alert with Email Template
Using Email Alert involves creating a classic or lightning email template and defining an email alert. This process should be familiar if you’ve worked with Workflow Rules or Process Builder before. In a Flow, you can select this email alert and pass the record ID as a parameter. Salesforce then replaces the merge fields in your email template with the corresponding record’s data.
Pros:
- Easy Template Creation: Email alerts use pre-defined templates that you can create in plain text, HTML, or with a drag-and-drop builder for lightning templates.
- Recipient Selection: You can select recipients based on various record fields like owner, creator, email field, as well as public groups and roles. Sending emails to Public Group/Roles is one of the unique features of sending emails using this option, as it is not available with other options.
- Reusability: Once defined, email templates and alerts can be used in multiple flows.
Cons:
- Limited Dynamism: Content in email is less dynamic as you can only use allowed merge fields in the template.
- No Email Logging: Emails sent using Email Alert aren’t logged as activities on related records.
- Fixed From Address: The “from” email address needs to be predefined in the email alert and cannot be changed at runtime.
2. Send Email Action
With the “Send Email” action in Flow, you can compose the entire email message within the Flow itself and select recipients.
Pros:
- Full customization: Compose email content directly within the flow using dynamic values, formulas, and flow variables.
- Granular Recipient Control: Use “Get Records” and flow resources to select recipients.
- Email Logging: Emails can be logged as activities on related records.
- From Address: You can choose the from address from CurrentUser, DefaultWorkflowUser or OrgWideEmailAddress.
Cons:
- Manual Composition: You’ll need to build the email content from scratch, requiring knowledge of CSS & HTML for rich emails.
- Maximum of 5 Recipients: With Send Email Action, you can send email to a maximum of 5 recipients only whether using “Recipient Address Collection” or “Recipient Address List” in the property of this element.
- No Reusability: Emails created with Send Email Action can only be used within that Flow (unless you create it as a Subflow).
- Changes to Email: Any changes to the email content will require saving the Flow as a new version and activating it.
3. Send Email Action with Email Template ID
Introduced in the Summer ’23 release, this option allows you to use a specific email template by providing its ID (you can get the template Id by using “Get Records” element from “EmailTemplate” object). While this method uses the “Email Template”, it does not use the “Email Alert”.
Pros:
- Template Features: Leverage classic/lightning email template features.
- Email Logging: Log emails as activities on related records.
- Merge Fields Replacement: Pass the “Related Record Id” value to replace merge fields in the template.
Cons:
- Limited Recipients: Recipient ID must be specified and is restricted to leads, contacts, or person account records.
Email Sending Limits
- If you’re using Log Email on Send or Email Template ID, the daily email send limit is based on the single email limit. For details, see General Email Limits.
- If you’re not using Log Email on Send or Email Template ID, the daily email send limit is based on the daily workflow email limit. For details, see Daily Allocations for Email Alerts
In conclusion, the best choice depends on your specific requirements. Email Alert is great for simplicity and predefined templates and for sending emails to a group of users, while Send Email Action offers full customization but requires more manual effort. The Send Email Action with Template ID combines features of both but not without limitations.
And do not forget to ensure that number of emails you want to send using any of these methods will stay within the email sending limits defined by Salesforce.
I hope this breakdown helps you decide the best approach for your Salesforce Flow email needs!
References & Useful URLs
- Salesforce help – Options for Sending Emails from a Flow
Does the limit of 5000 only apply when using the log email and template id
or either one?
Is there any trick to log the email but send more than 5000?