

Different Ways of Sending Emails from Flow in Salesforce
Salesforce Flow is a powerful automation tool that allows admins and developers to create workflows without writing code. One common requirement in automation is sending emails to users, customers, or stakeholders based on specific triggers or actions. Salesforce Flow provides multiple ways to send emails, each with different levels of customization and complexity. In this article, we’ll explore the different methods available for sending emails using Flow.
1. Using the “Send Email” Action in Flow
The Send Email action is the simplest way to send an email directly from Flow. This built-in action allows you to send emails without writing Apex code. Send Email action is used when you need dynamic control over email recipients, subject, body, or attachments.
Steps to Use:
- Open Salesforce Flow Builder.
- Choose the flow type, depending on your use case.
- Add an Action element and search for “Send Email”.
- Provide required input values:
- Recipient Addresses Collection – Enter static email addresses or use dynamic values from records.
- Sender Email Address – Choose from predefined org-wide email addresses.
- Subject – Define a static subject or use dynamic data.
- Body – Use plain text or merge fields to personalize content.
- Email Template ID – Choose an email template to send emails in a pre-defined format without manually drafting the content each time.
- Rich-Text-Formatted Body – To enable users to view rich texts in their emails.


Save and activate the Flow.
2. Using an Email Alert in Flow
Email Alerts are predefined email templates that can be triggered from Flows. This method is useful when you don’t require complex email customization in the flow.
Steps to Use:
- Create an Email Alert:
- Navigate to Setup > Email Alerts.
- Click New Email Alert.
- Enter the description and choose the object that triggers the Email Alert.
- Select the Email Template to use.
- Choose Recipients.
- Save the Email Alert.

- Use Email Alert in Flow:
- Open Flow Builder.
- Add an Action element.
- Search for “Send Email Alert”.
- Select the created Email Alert.
- Provide necessary inputs.

- Save and activate the Flow.
Limitations:
- Less flexibility in dynamically modifying email content.
- Emails can’t be sent to dynamically fetched email addresses unless stored in a record.
3. Using Apex-Defined Email Action in Flow
You can create an Apex Invocable Method to send emails and call it from Flow.
Steps to Use:
- Create an Apex Class:
public with sharing class EmailHelper {
@InvocableMethod
public static void sendCustomEmail(List<EmailRequest> requests) {
List<Messaging.SingleEmailMessage> emails = new List<Messaging.SingleEmailMessage>();
for (EmailRequest ereq : requests) {
Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
email.setToAddresses(new List<String>{ereq.toAddress});
email.setSubject(ereq.subject);
email.setPlainTextBody(ereq.body);
emails.add(email);
}
Messaging.sendEmail(emails);
}
public class EmailRequest {
@InvocableVariable
public String toAddress;
@InvocableVariable
public String subject;
@InvocableVariable
public String body;
}
}
- Use Apex in Flow:
- Open Flow Builder.
- Create an autolaunched flow that executes the Apex class.
- Search for the Apex class name.
- Provide required input values (toAddress, Subject, Body).
- Save and activate the Flow.

- Create a record-triggered flow that calls the above sub-flow.
- Provide the required input values, save, and activate the flow.

Limitations:
- There are governor limits on emails:
- Per Transaction Limit: You can send a maximum of 10 email messages per transaction using Messaging.sendEmail().
- Per Day Limit: The org-wide limit for sending emails is:
- 5,000 emails per day for Enterprise & Unlimited editions.
- 1,000 emails per day for Developer Edition & Trial org.
- Unlike Email Alerts, this method does not automatically use org-wide emailaddresses unless explicitly set.
- Requires Apex coding knowledge and development experience.
4. Using a Custom Email Template with Flow Variables
If you need flexibility in email content but do not want to write Apex, you can use Text Templates within Flow.
Steps to Use:
- Create a Text Template:
- Inside Flow, add a Text Template resource.
- Enter your email content and include merge fields for personalization.

- Use in “Send Email” Action:
- Instead of static text, use the Text Template as the email body.

- Enter the other required inputs (like recipient address, subject, rich-text formatting, and line breaks).
- Save and activate the Flow.
Conclusion
Salesforce Flow provides multiple ways to send emails, ranging from simple built-in actions to advanced Apex-based solutions. The suitable method varies based on your specific requirements. By selecting the right approach, you can ensure efficient and automated email communication within your Salesforce org. Whether you’re an admin looking for no-code solutions or a developer needing advanced customizations, Salesforce Flow has an option for you.