Loading
Prepare for Email to Become the Default Login ExperienceRead More
Intermittent freezing when using using certain browser versionsRead More
Automate Your Business Processes with Salesforce Flow
Send Follow-Up Email Using an Email Template Example

Send Follow-Up Email Using an Email Template Example

Walk through a complete example of a record-triggered flow that automatically sends a follow-up email to a case contact when a case is closed. This example uses the Send Email action with an existing email template that includes recipient merge fields.

Required Editions

View supported editions.
User Permissions Needed
To open, edit, create, activate or deactivate a flow using all flow types, elements, and features available in Flow Builder, including Einstein and Agentforce for Flow: Manage Flow
To create or update a case:
  • Read on Case
  • Create on Case

This example assumes you've already created the email template named Follow-Up Email After Case Is Closed. To learn about creating email templates, see Create an Email Template in Lightning Experience

Important
Important To send email from Salesforce, the Send Email action in Salesforce Flow requires domain-level and user-level email verification. Email delivery fails if either the user's email address or the email-sending domain is unverified. See Requirements to Send Email from Salesforce.
Note
Note If you're following along in an existing flow, make sure the Send Email action version is set to 1.0.1. To prevent broken email template ID references when you deploy a flow from one org to another, use the Email Template Name instead of the Email Template ID. To use an Email Template Name, change the Action Version in the Send Email action to 3.0.1 or later.

This example walks you through building a record-triggered flow on the Case object, from configuration to activation.

  1. Open the Flows list view.
    • From the Automation app, select the Flows tab.
    • From the Flows tab in any Lightning app, click the actions menu and select Open Flow.
    • From Setup, in the Quick Find box, enter Flows, and then select Flows.
    Note that the Automation app and Flows tab options don't require Setup access.
  2. Create a record-triggered flow.
    • From the Automation app, click New | Triggered | Record-Triggered Flow.
    • From Setup, click New Flow | Triggered | Record-Triggered Flow.
  3. Configure the Start element.
    1. For Object, click Case.
      Case is selected because that's the type of record that triggers the flow when it's updated.
    2. For Trigger the Flow When, select A record is updated.
    3. In the Set Entry Conditions section, for Field, click Stage. For Operator, click Equals. For Value, enter Closed.
      A record is updated is selected, and this entry condition is added, because we want the flow triggered when a case is updated to a Closed status.
    4. Use the default values for the other fields.
  4. Add and configure an Action element. The action element is used to send the email.
    1. Click Add element plus icon, and select Action.
      A list of available actions opens.
    2. In the search bar, enter Send Email, and then click Send Email.
      For more information about the Send Email action, see Flow Core Action: Send Email.
    3. For Label, enter Send Follow-Up Email and use the default API name, Send_Follow_Up_Email.
      Follow-Up Email After Case Is Closed is the name of the email template you previously created.
    4. For Recipient Addresses, click Triggering Case, click Contact ID, and then click Email.
    5. To add your existing email template, click Use Email Template.
    6. To use an Email Template Name, set the Action Version for the Send Email action to 3.0.1 or later, and select Follow-Up Email After Case Is Closed from the Email Template Name field.
    7. If you are on action version 2.0.1 or lower, search for and select Follow-Up Email After Case Is Closed in the Email Template ID field.
    8. For the Recipient ID value, click Triggering Case, and then click Contact ID.
      This step sets the email recipient to the case record that triggers the flow when it gets updated.
  5. Save and name the flow.
  6. To make sure that the flow works as expected, debug and test it by using different scenarios.
  7. To start sending emails, activate the flow.
    A flow with a configured Send Email action

The flow sends an email to the contact of a case record when the stage is closed.

Important
Important After migrating flows, always review and reconfigure the Send Email action to reference the new record IDs in the target Salesforce org. This step is crucial to avoid broken references and to make sure that email delivery functions correctly.
 
Loading
Salesforce Help | Article