Example: Send an email alert to HR team
When Sage People action events or custom action events do not provide the option you need, you can set up a Flow to send an email alert. For example, you can set up an email alert to the HR team when a new team member completes the onboarding form.
When planning the email alert, remember emails sent from Flows cannot use cross object merge fields. If the field you want to include in the email is not part of the object from where the email is triggered, consider using a formula field to hold that value from the other object. For more information, see Business context for alerts and notifications and Create a formula field.
Before setting up the Flow, create an email template, and set up the Email Alert.
Set up the Email Alert
-
Go to Setup > Platform Tools > Process Automation > Workflow Actions > Email Alerts.
-
Select New Email Alert.
-
On the New Email Alert page, complete the fields as follows:
Field What to enter Description A short description of the purpose of the Email Alert, displayed in the list of Email Alerts. Unique Name Automatically completed based on the Description. Object Picklist. Select HCM Form Email Template Select the Email Template lookup and select the Email Template you want to use for the email alert. Recipient Type Picklist, defaults to User. Select the type of recipient you want to use, such as User or Public Group. Recipients The options available in Available Recipients changes based on the selected Recipient Type. Choose the recipients you want to add from the Available Recipients panel and select Add to move them to the Selected Recipients panel. Additional Emails Text box. Enter up to 5 email addresses to receive the email alert. From Email Address Picklist. Select the email address you want to appear as the sender of the email alert. You can choose the current User, the default Workflow User, or a company wide email address. - Select Save.
Set up the Flow
The following diagram displays the process flow for the email alert Flow:
-
Go to Setup > Platform Tools > Process Automation > Flows and select New Flow.
-
Select Record-Triggered Flow and select Create.
-
On the Configure Start screen, select the object and trigger, and set the entry conditions as follows:
-
Object: select the field, search for HCM Form and then select the HCM Form object from the search results.
-
Trigger the Flow When: select A record is updated
-
Condition Requirements: select All Conditions Are Met (AND) and enter the details for the conditions as follows:
-
Field: select Form Definition Name (fHCM2__Form_Definition_Name__c)
-
Operator: select Equals
-
Value: enter Onboarding Form
Select Add Condition to add another condition as follows:
-
Field: select Completed Date (fHCM2__Completed_Date__c)
-
Operator: select Is Null
-
Value: select {!$GlobalConstant.False}
-
-
When to run the Flow for Updated Records: select Only when a record is updated to meet the condition requirements
-
Optimize the Flow For: select Actions and Related Records
-
-
On the Flow Builder canvas, select + Add Element between the Start and End elements.
-
Select Send Email Alert.
-
On the New Action screen, select Action and search for and select the Email Alert you created.
-
On the New Action screen, complete the Label and optionally, the Description. The API Name field is automatically completed based on the Label.
-
In the Set Input Values for the Selected Action section, select Record ID and then select {!$Record.Id}.
-
Select Done.
-
On the Flow Builder canvas, select Save, enter the Flow Label and optionally the Description. Flow API Name is automatically completed based on the Flow Label. Then select Save.
-
After saving, select Activate to make the Flow active.