Using Send Rich Email to Improve Workflow Rules Communication

The Email Alerts that are available in Workflow Rules are limited in functionality. I remember thinking this as a customer of Salesforce more than 15 years ago. Salesforce isn’t investing in Email Alerts because it wants to transition to more modern technology. In the meantime, here’s an approach for getting massively customizable email into your Workflow Rules.

In this example, we’ll assume that you have a Workflow Rule that runs on Contact every time the email address of the contact changes. You want to send certain things to certain recipients, but Email Alerts don’t give you enough flexibility.

With Process Builder and Flow you can get the flexibility you need, but you’ll need to trigger the process by updating a special field.

  1. Add a text field to your object. Suppose you are sending emails about something affecting Contact. In this case, add a boolean field called “TriggerEmailSend” and set it by default to False. Modify your Workflow Rule to set this field to true using an Update Field
  2. Create a Flow that uses the Send Rich Email action. Use the “Autolaunched” Flow Type. Configure the flow with input variables to capture any information you’re going to need in your email. For example, if you want your email to have a link that brings the user to a record, you’ll need a recordId input variable. Activate this flow.
  3. Create a Process Builder trigger that runs whenever the TriggerEmailSend field is changed to True on the Contact object. Have it call the Flow you’ve created, passing it the recordId of the Contact that triggered the change.
  4. The Flow that you created in step 2 above should also modify the contact using an Update Record element with an Assignment element to set the TriggerEmailSend back to False.

This process will get easier later this year, when Flow gets the ability to trigger on all record changes. That will eliminate the Process Builder step.

Note that you may not need step 1 at all. You can create a Process Builder process that triggers on the same field that triggered your workflow rule.