This walk-through demonstrates how to build a Flow from a common use case: sending a notification when a user is suspended in Okta.
Familiarize yourself with the Workflows basics:
Build the Flow
- In Admin Console, go to Workflow > Workflows Console.
- In Workflows console, click New Flow. Or, if you have a folder where you’d like to store the Flow, open it and click Create a Flow Now.
- Click Add New Event, and then select Okta from the menu of applications.
- In the Okta events menu, select User Suspended.
- If you haven’t connected your Okta account yet, click New Connection.
- In Admin Console, go to Applications > Applications.
- Select Okta Workflows OAuth.
- In the Sign On tab, copy the Client ID. Return to Workflows console and paste it into the Client ID field in the New Connection window.
- In the Sign On tab, copy the Client Secret. Return to Workflows console and paste it into the Client Secret field in the New Connection window.
- In Workflows console, enter your domain name, without
http://, in the New Connection window.
- Click Create.
- If you’ve already connected your Okta account, you may be prompted to authenticate your connection. Sign in with your Okta credentials.
- In Workflows console, click Function, and then select Compose.
- In the Compose card, type the following message: Hello, the user with username was suspended in Okta. (Leave a blank space after username.)
- Drag and drop the Alternate ID field from the Okta - User Suspended card to the blank space in the Compose card.
- In Workflows console, go to Add Another > App Action.
- Select Office 365 Mail from the menu of applications, and then choose Send Email from the actions menu.
- If you haven’t authenticated your Office 365 account, complete the prompt steps.
- In the Send Email card, enter your email address into the To field.
- Drag and drop the output from the Compose card to the Body field of the Send Email card.
- Enter User Suspended Notification in the Subject field of the Send Email card.
- Click Save, and then name your flow. Be sure to select Save All Data.
- In Workflow console, toggle the Flow is OFF switch to ON.
Trigger the Flow
Note: It takes about 60 seconds for the Flow to enable. After saving and turning on your Flow, wait one minute before you attempt to trigger it.
- In Admin Console, go to Directory > People.
- Select a user, and in their More Actions menu, click Suspend.
- In Workflows console, click Flow History.
- Verify that each card in your Flow has a success check mark.
- Verify that you received the User Suspended Notification email.