Salesforce – From Process Builder To Lightning Flow – Creating Records
December 2, 2020Salesforce – From Process Builder To Lightning Flow – Post to Chatter
December 16, 2020Introduction to Email Alerts
We’re on part six of “from Process Builder to Lighting Flow” and we're going to look at Email Alerts. I hope this series has been helpful to you. In this post, we’re moving past data manipulations and will focus on actions.
The first action we’re going to look at is sending an Email Alert. Before we can begin, we first have to create an old Workflow based Email Alert; yes, the one we used before Process Builder was ever thought of. These Email Alerts have been around for as long as I can remember and I’m going to assume one has already been created.
Sending an Email with Process Builder
Now, with that out of the way, let’s take a look at Process Builder. In our use case, we’re going to send an email to the Account Owner’s Manager when the Customer’s CSAT Rating is set to Unsatisfied.
- First, we click on Add Action
- Select Email Alerts for the Action Type
- Give the Action a Name
- In the Email Alert field, search for and select that old Workflow-based Email Alert
- Press the Save button and the Action is setup
Email Alerts in Lightning Flow
Let’s move into the world of Lightning Flow. These series build on each other so if you need to go back and review, here’s what you’ll need to consider:
- Email Alerts create a Task record, right? Because of that, we need to use an After Record-Trigger Flow. Remember the Order of Execution rules. This is all covered in the Getting Started post.
- Once the Record-Trigger Flow opens, you’ll need to create a Decision.
With that all set up, we can work on sending an email.
- Click on the Add Element “+”

- We’re going to select Action from the Interaction section. The Action Element is one we’ll use frequently as it can do many things.
Click into the Action lookup field where it says Search all Actions. This is somewhat like the Action Type in Process Builder where you have to say what you want to do. I find it easiest to simply type what I’m looking for as, in Flow, the number of options is extensive. You can Filter by Category on the left side of the screen but tend to just type what I’m looking for. Type email into the field and any option that has the word email will appear for us to choose.- One of the options that will appear will be the old Workflow-based Email Alerts we used in Process Builder. Because our goal here is to replicate Process Builder, let’s select the one we used by clicking on its name.
- A second option is called Send Email. We’ll come back and talk about that later as it lets us eliminate the old Email Alerts entirely.
- Now that we have selected the Action, just like in Process Builder we need to give it a Name.

- Our final step is to tell the Action what record we’re working with. Why do we have to tell it the record? Doesn’t it know about our friend, $Record? Sadly, no. This is because all the Elements we’re using are the same Elements used across all the different types of Flows. The good news is that what you’re learning can be applied to all the Flow types.
- Back to finishing up this Action. The Record ID is set using our good friend, $Record.Id.
Press the Done button and you have completed the Action.
Now that you have sending emails mastered, take a look at the Send Email Action when you have a chance. It looks a bit like an email form. It has a Body and a Subject. You define the recipients either by creating a text collection variable or you can just enter a comma-separated string of email addresses. You can even select the person you want the email to come from. Pick from an Org-Wide Email Address, the default Workflow User, or the Current User. For more insight take a look at this Salesforce help article.
In Conclusion
Thanks for taking the time to read this post. If you have any questions, reach out to me on Twitter, YouTube or LinkedIn. Download the cheatsheet. Watch on YouTube to see me build this action. Share this series with your friends. Please subscribe, follow me, and I will continue to deliver you helpful content. Next week, we’ll be learning how to Post to Chatter.