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 to 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. This example uses Gmail, but you can substitute Slack or Office 365 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, select 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 Run this card 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 Salesforce Create User and Gmail Send Email 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.