<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
Automate App Unassignment Emails using Workflows
Workflows
Okta Classic Engine
Okta Identity Engine

Overview

This article will guide you through sending an email notification using Okta Workflows when a user is unassigned from an app.

 

Solution

Specific app unassignment notification

This flow will run when a user is unassigned from an application:

App unassignment notification flow
App unassignment notification – flow.

 

How the flow works

  1. The flow runs when a user is unassigned from an application (the Okta-Unassigned from Application event card).
    • In the card options, you must configure the application for which this flow will run. This example uses the Salesforce app.
       
  2. The Text-Compose card generates a message that includes user information and application details.
  3. The Gmail-Send Email card sends the notification email.

 

Email message
Email message.

 

Any app unassignment notification

There are two approaches to running a flow without configuring for a specific app:

 

  1. Use the Okta-User Unassigned from Application event card without configuring a specific application.
  2. Use an Okta event hook

 

Use Okta-User Unassigned from Application event card

Use the Okta-User Unassigned from Application event card, specifying All Apps instead of a specific app in the card’s Options.

 


Running for all apps.

 

A flow with this event card set up will run when a user is unassigned from any app.

 

The Application object holds the information about the application.

 


Running for all apps.

 

Use an Okta event hook

To run a flow when a user is unassigned from any application, set up a flow with an API Endpoint and create an Okta event hook.

 

Okta event hook for ‘User unassigned from app’ event   
Okta event hook for ‘User unassigned from app’ event.

 

The event hook that triggers the flow:

 

App unassignment notification with API Endpoint flow
App unassignment notification with API Endpoint – flow.

 

How the flow works

  1. The API Endpoint card gives the flow an API endpoint. When a user is unassigned from an app, the event hooks call the API, which runs the flow.
  2. The Object-Get Multiple card extracts user and application information from the API endpoint.
  3. The Text-Compose card generates a message that includes user information and application details.
  4. The Gmail-Send Email card sends the notification email.

 

What is the difference between using the event card and the event hook?

Let’s say you want to be notified when a user is unassigned from three specific apps. Using the Okta-User Unassigned from Application event card configured for all apps, you will need to add logic to check for those apps. This means the flow will run for any app unassignment and then check the logic to determine whether to continue running.

 

An Okta event hook allows you to configure a filter on the event hook side. This means the flow will only run when the filter matches the app you are interested in. Using an event hook is usually more granular and less noisy.

 

The following resources will help you learn about Okta event hooks:

 

 

Related References

 

 

Recommended content

Loading
Automate App Unassignment Emails using Workflows