<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
How to Setup an Error Notification Flow in Okta Workflows
Workflows
Okta Classic Engine
Okta Identity Engine
Overview

In Okta Workflows, it is possible to create a reusable Helper Flow that can be called from other flows to send error notifications when a flow execution error occurs.

Applies To
  • Okta Workflows
Solution
  1. Create the Helper Flow that will send the error notifications:
  1. Create a new flow in any folder (create a folder called "Utilities" to store Helper Flows that will be used frequently).

  2. Add a Helper Flow event card to the flow and create an input of data type text called 'message'.

  3. Add the Slack connector Send Message to Channel action card to send the error notification message. Note that it is possible to use another application connector or function, such as Gmail, Office 365 Mail, etc., to send out the error notification.

  4. After configuring the Send Message to Channel card, drag the 'message' input value from the Helper Flow card to the Slack Send Message to Channel card 'Text' input:

    Send Message to Channel card 

  5. Save the flow and turn it on.
  1. Now that the Helper Flow for sending error notifications has been created, it can be called from other flows, passing it an error message:
    1. Create a new flow and add error handling to it:

      1. Add an If Error function card. This card looks like a container and has a dropdown near the top where Try and If Error can be selected.

      2. Select Try, and add the actions and functions to be executed.

        1.  Workflows will attempt to execute the cards within the Try block.

        2. If an error occurs, the card will execute the cards within the If Error block.

      3. Select If Error, and add the following cards within the block:

        1. Flow Control- Assign card
        2. Text - Compose card

        3. Flow Control - Call Flow card

      4. In the Assign card
        1. Create an input named 'workflowsBaseUrl' and set it to your Okta org base URL.
        2. Create another input named 'flowId' and set it to the ID of the current flow, which can be copied from the end of the URL in the browser address bar. For example:
      5. In the Text - Compose card, build out the error message with a link to the execution history of the flow that failed

        • Use the 'workflowsBaseUrl' and 'flowId' inputs from the Assign card and the 'execution' and 'message' fields from Error object to build the history link as seen in the screenshot below.
      6. In the Call Flow card, select the Helper Flow created earlier, and drag the 'Error Message Notification' output from the Compose card into the 'message' input on the Call Flow card:
        Call Flow card 
    2. Save the flow and turn it on.
  1. To test the flow, add a Read User card in the Try block of the If Error card and set the 'ID or Login' input to an invalid value. This will generate an error, and the 'If Error' block of the If Error card will be executed:
    Read User card 

 

Loading
How to Setup an Error Notification Flow in Okta Workflows