---
schema_version: "1"
id: 9584ddf59bd35777f692b716482006168033041fcfb9b015840490e623a66db8
title: Workflow Rule with an Email Alert Migration to a Flow Example
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/sample_flow_email_alert.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.sample_flow_email_alert.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 69219a081efeb14bf4b270da818a17447afb42c921039c54cb07a0b4132b30b2
description: The majority of workflow rules are used to send email alerts or perform same-record field updates. While these types of workflow rules have a reputation for being fast, triggered flows are even faster. It’s time to migrate your workflow rules to Flow Builder.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Workflow Rule with an Email Alert Migration to a Flow Example

The majority of workflow rules are used to send email alerts or perform same-record field updates. While these types of workflow rules have a reputation for being fast, triggered flows are even faster. It’s time to migrate your workflow rules to Flow Builder.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

Let’s look at a common workflow rule. This rule sends an email alert when an Opportunity is Closed-Won and the Amount is more than $500.

![Workflow rule email example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/process_builder/sfea1.png)

This workflow rule can be built easily in Flow Builder. Here are the elements in a workflow rules and their flow equivalent.

 
| **Workflow Rule Element** | **What to Use in Flow** |
| --- | --- |
| Create New Rule | Create a Record-Triggered Flow. |
| Description | Use the Description field. This field is available when you save the flow. |
| Email Alerts | Use Send Email in the Action element. Existing Email Alerts can be selected. |
| Rule Name | Use the Flow Label field. This field is available when you save the flow. |
| Select Object | Use the Object field. This field is available in the Select Object section of Configure Start. |

## Evaluation Criteria

When you build a flow, the evaluation criteria are defined in the Start element, in the Set Entry Conditions section. Use as specific as possible Entry Criteria. This way you don’t run a flow when you don’t need to.

Workflow Rule

![Set up of workflow rule](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/process_builder/sfea2.png)

Flow:

![Flow set up](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/process_builder/sfea3.png)

When to Run/Trigger (1)

Our example Workflow Rule uses created, and any time it's edited to subsequently meet criteria. For the flow, select “A record is created or updated under Configure Trigger”. And select “Only when a record is updated and meets the condition requirements” for When to Run the Flow for Updated Records. You choose this option in the Set Entry Conditions.

Rule Criteria/Set Entry Conditions (2)

The criteria/conditions are similar in both the WFR and the flow. The Condition Requirements field is set to “conditions are met”. The Field, Operator, and Value are almost identical. The field names are slightly different, as the Object isn’t included in the Field Name in a flow.

## Add an Action

![Email alert in workflow rules](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/process_builder/sfea4a.png)

When you build a workflow rule, the action is selected after the Rule Criteria is entered.

In Flow, there’s a Send Email Alert option from Add Element.

![Email alert in Flow](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/process_builder/sfea5b.png)

Select the email alert by clicking in the New Action window. Choose the alert to use from the list. You can use existing Email Alerts that you used previously in workflow rules. Configure Email Alerts to be used in flows just as you did for workflow rules. Email Alerts are configured under Workflow Actions in Process Automation.

![select email alert in New Action](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/process_builder/sfea6.png)

In the flow, enter $Record into the Record ID field. This global variable contains the values from the record that triggers it to run. So, there’s no need to add a Get Records element to obtain the record data. And, no flow variables have to be created to store the record data.

![Use $Record in Record ID field](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/process_builder/sfea7.png)

If you have a workflow rule similar to this example, use the migration tool. The migration tool does a great job and even adds the workflow rule name and description in the details of the new flow.

![Migration tool output](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/process_builder/sfea8.png)