Loading
Feature degradation | Gmail Email delivery failureRead More
Automate Your Business Processes
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Send an Email Using an Existing Email Template Example

          Send an Email Using an Existing Email Template Example

          This example uses an existing email template to send a follow-up email to a new contact based on a case. It uses the Send Email action and an email template with merge fields that are populated by the recipient.

          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.

          Create the flow that sends an email to your customer when a case's stage is closed.

          1. Open the Flows list view.
            • From Setup, in the Quick Find box, enter Flows, and then select Flows.
            • From the Automation app, select the Flows tab.
            • From the Flows tab in any Lightning app, click the actions menu and select Open Flow.
          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 exiting 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