Step 4: Customize the flow
Customizing a flow with your own actions is a core feature of the Okta Workflows platform. Customers tell us that adding notifications is a common use case in identity flows. Using that as an example, here are some operations that will help you understand the customization features of Okta Workflows.
Let’s modify a flow so that a notification is sent after the user is created. We’ll use Gmail for this example, but you can substitute Slack or O365 in the steps that follow.
- In your Shared folder, hover over the Date Created column of the Create User in Salesforce flow, and then click Duplicate.
- Select the duplicate flow (appended with the word
COPY), and change its name to Create User in Salesforce and Send Notification.
- After naming and describing your new flow, check the box to retain history for this flow.
- Scroll right to the Create User card in the If/Else branch. Click the Add Another menu (inside the If/Else branch), and then select App Action.
- In the Applications menu, select Gmail.
- In the Gmail Actions menu, select Send Email.
- In the New Connection window, verify your Gmail account, and then click Create. If your connection is no longer active, click the Gear icon and select Reauthorize.
- Test the new Send Email card. Enter your email address, a subject, and a test message, and then click the card’s Test icon.
Now, let’s add a real message that requires input from a previous field.
- In the Add Another menu, select Function.
- In the Functions menu, select Compose.
- Drag the Compose card to the left, and position it between the Create User (Salesforce) and Send Email (Gmail) cards.
- In the Compose card, enter the following message: The workflow for the user with userName of [input userName] was completed.
- Drag the Okta User Alternate ID from the User Assigned to Salesforce event card into the Compose card. When you see it in the message body, drag it into the [input userName] field and remove the brackets.
- Drag the output of the Compose card to the Body input field of the Send Email card.