In the case that the record fails to share out, it will be beneficial to know what caused the failure. With Actions 2 and 2.1 (see image below) of the Share Records Flow, an email notification will be sent to an address containing information about the specific record that failed and the error. One email will be sent for each record that fails to share out successfully.

(info) NOTE

  • The flow_designer role is required for you to create and edit a Flow in Servicenow. Ensure that you have at least the flow_designer role before proceeding.
  • If you do not have the admin role, email notifications may not send out. In order to run the Flow with elevated privileges, navigate to the Flow’s Properties and change the Run As option to System User.


Procedure 

To set up email notifications with the Share Records flow designer, follow these steps:


Navigate to Share Records Flow Designer

Go to Flow DesignerUnder the Flows section, click on Share Records.

Configure If statement

Click the If logic in Action 2. 

Using the dropdown menu, select “is not” and in the text box, type in “200”. This ensures that when a record fails to share out, more steps will be taken.

Next, click on the icon for Action 2.1, the Send Email step. Enter an email address in the To input box. 

Update email message

In the body of the email, the Record Number, Error Message, and Queue can be added to provide more information. Replace the highlighted words with the appropriate Data Pills by using the Data Pill Picker, clicking on 1 - Post Message, and selecting the matching option.

Example below is the default email body without Data Pills:

Example below is the completed email body with Data Pills:

Save and activate Flow Designer 

In the upper right corner of Flow Designer, click Save and then click Activate. Confirm Flow Activate if needed.