Blog

Send An Email From Record-Trigger Flow

Use Case :

When an opportunity is Closed-Won, you can send an email from Record-Trigger Flow to notify both the opportunity owner and account owner. The email should include all relevant opportunity specifics using a predefined email template.

flow-setup.png" alt="Flow setup screen

Using flows, there are two ways to send an email.

  • Send email using standard email alerts.
  • Compose email directly using send email action.

Compose email directly using send email action

  • Navigate to Home then search for Flows.
  • To start a new flow, click New flow.
  • Choose, Record Triggered flow.
  • Next select an Object, Opportunity.
  • Configure Trigger, when A record is updated.
  • Choose Optimise the Flow for: Actions and Related Records.
  • The Click Save.
Send An Email From Record-Trigger flow setup screen
  1. To set entry criteria, drag the decision logic element.
    1. StageName Equal to Closed Won.
    2. StageName Is Changed {!$GlobalConstant.True}.
Add email action

You have now fulfilled the requirements for entering our flow. Let’s now use flow to develop an email action.

  1. From the toolbox drag Action interaction to the screen/Canvas.
  2. Next in Action search for Send Email.
    1. Choose a label :- Send Email.
    2. Api Name :- Send_Email.
    3. Description :- Sending an email to the opportunity owner and account owner is the purpose of this action.
  3. In Input Values, lets create a body using new resource and make this as a dynamic.
    1. Hover in body, then click for new resource.
    2. API Name :- EmailTemplate.
    3. Body :- {!$Record.Name} has reached Closed Won.
    4. Please find the below details.
    5. Opportunity Account Name : – {!$Record.Account.Name}.
    6. Opportunity Amount : – {!$Record.Amount}.
    7. Opportunity Type: – {!$Record.Type}.
    8. Finally, click Done.
  4. Choose the email action body as {!EmailTemplateBody}.
  5. Subject :- {!$Record.Name} is Closed Won.
  6. Email Addresses (comma-separated) : –Choose Include.
    1. And Choose {!$Record.Owner.Email}, {!$Record.Account.Owner.Email}
  7. Rich-Text-Formatted Body :- Select Include.
    1. And Choose {!$GlobalConstant.True}.
  8. Click Done.
Send An Email From Record-Trigger using email action
Email output screen
Final output of Send An Email From Record-Trigger flow

Once you are done with the flow below method to connect and save the flow.

  1. Connect the start and action of the flow.
  2. Click Save.
  3. Click Save.
  4. Then select Show Advanced.
  5. API Version for Running the Flow: 56.
  6. Click Save

Limitation and Configuration :

  • The maximum number of recipients for emails sent from flow is five.
  • You will receive an email with HTML tags if Rich Text formatted body is not set to true.
Trigger Flow
Trigger Flow

Let’s update a record for an opportunity and see how that goes.

Trigger Flow
Trigger Flow

We are Inno Valley Works, We are a passionate team of developers, best thinkers and consultants who can solve anything and everything.
With our highly engaging team, you can easily bring the vision to all your business ventures come true.
We have team, put your problem, get your solution


🎥 Check Out Our YouTube Channel

Explore helpful tutorials, product updates, and feature walkthroughs from the team at Innovalley Works.

👉 Visit Our Channel