<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
Process Two Event Hooks (Webhooks) with a Single Flow in Workflows
Okta Classic Engine
Okta Identity Engine
Workflows

OVERVIEW

This article provides an example of processing two event hooks with a single flow in Okta Workflows.

 

SOLUTION

Flow with API Endpoint

Create a flow to invoke with an API endpoint.

 

Flow with an API endpoint 
Flow with an API endpoint.

 

Click on </> at the bottom of the card to see the API endpoint settings and the invoke URL.

 

API endpoint settings  
API endpoint settings.

 

Event hook with two events

Create a single Okta event hook that triggers when either of these events occurs:

 

  • User deactivated
  • User password reset

 

This image illustrates an event hook that supports two events. The listed events can be seen at the bottom of the image, in the Select Events section.

 

Event hook with two events 
Event hook with two events.

 

The event hook calls the flow API endpoint whenever a user is deactivated or their password is reset in Okta.

Okta Workflows Tutorial: Notify When a User is Added to a Group (with Event Hook filtering)

Flow to process events

This image shows a flow to process the two events:

 

Flow to process two events 
Flow to process two events.

 

How the flow works

 

  1. The API Endpoint card allows to invoke this flow with an API endpoint.
  2. The Object-Get card gets the event type that triggered the flow.
  3. The If/ElseIf card checks the event type and executes steps specific to that event.
    • The event name when a user is deactivated is user.lifecycle.deactivate.
    • The event name when a user's password is reset is user.account.reset_password.

 

For example, when a password reset event triggers the flow, the If/Elseif card does this check:

 

Checking for event type 
Checking for event type.

 

And runs these step(s):

 

Password reset branch 
Password reset branch.

 

Optionally, you can continue running the flow after the If/Elseif card:

 

Flow execution processing two events 
Flow execution processing two events.

Download flow template

 

RELATED REFERENCES

 

 

Recommended content

Loading
Process Two Event Hooks (Webhooks) with a Single Flow in Workflows