Loading
Salesforce now sends email only from verified domains. Read 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 a Text Template Flow Resource Example

          Send an Email Using a Text Template Flow Resource Example

          Use the Send Email action to send an email to your customers each time the status of their order changes using a text template flow resource. For example, your sales reps don't have time to keep sending emails to customers to update them on their orders. You want to email the customers automatically with a flow.

          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 an order:
          • Read on Order
          • Create on Order
          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.

          Create the flow that sends an email to your customer.

          Create the Flow

          Create the flow that sends your email.

          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 , then click New | Triggered | Record-Triggered Flow.
            • From Setup, click New Flow | Triggered | Record-Triggered Flow.
          3. Configure the Start element.
            1. For Object, click Order.
              Order is selected because that's the type of record that triggers the flow.
            2. For Trigger the Flow When, select A record is created or updated.
            3. In the Set Entry Conditions section, for Field, click Status. For Operator, click is Changed. For Value, enter True.
              A record is updated is selected, and this entry condition is added, because we want the flow triggered each time an order's status is updated.
            4. Use the default values for the other fields.

          Create and Configure the Text Template

          Create and configure the Text Template resource in your flow.

          1. In your flow, click Open Toolbox icon.
            The flow Toolbox opens.
          2. Click New Resource.
          3. For Resource Type, click Text Template.
          4. For API Name, enter EmailBody.
          5. Enter the email body content as Dear User, Thank you for your recent purchase! The status of your order has changed to.
          6. Insert the order status to the email body. Click Insert a resource... | Triggering Order | Status
          7. Finish the email body. Enter If you have any questions or need further assistance, please do not hesitate to contact us. Best regards, Your Sales Team

          Configure the Send Email Action and Rest of Flow

          Configure the Send Email action within your flow and finish setting up your flow.

          1. Click Add element plus icon, and select Action.
          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 Email Order Status Update and use the default API name, Email_Order_Status_Update.
          4. For Recipient Addresses, click Triggering Order, click Account ID and then click Account Email.
            For this example, we created a custom Account Email field on the Account object.
          5. Click Compose Email Content.
          6. For Subject, enter the text Update on your order!.
          7. For Body, select Search Resources from the dropdown and then search for and click EmailBody.
          8. For the Rich-Text-Formatted Body value, click True.
          9. Save and name the flow.
          10. To make sure that the flow works as expected, debug and test it by using different scenarios.
          11. To start sending emails, activate the flow.
            A record-triggered flow with a configured Send Email action

          The flow sends an email to your customers each time the status of their order changes.

          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 ensure that email delivery functions correctly.
           
          Loading
          Salesforce Help | Article