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.
Click on </> at the bottom of the card to see the API endpoint settings and the invoke URL.
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.
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.
How the flow works
- The API Endpoint card allows to invoke this flow with an API endpoint.
- The Object-Get card gets the event type that triggered the flow.
- 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.
And runs these step(s):
Password reset branch.
Optionally, you can continue running the flow after the If/Elseif card:
Flow execution processing two events.
Download flow template
RELATED REFERENCES
- Understanding Okta Workflows Events.
- Okta Workflows Tutorial: Notify When a User is Added to a Group (with Event Hook filtering)
