This guide will demonstrate how to include the running flow name in a Slack message in Workflows.
- Okta Workflows
A flow has been defined that sends a message to Slack. It could be a regular message or an error message. Is it possible to include the flow name in the message so the recipient knows which flow sent the message?
This guide will show three ways to accomplish that:
- Setting the flow name using the Assign card
- Using a helper flow to get the calling flow name
- Using a reusable helper flow to get the calling flow name
Setting the flow name using the Assign card
Set the flow name at the beginning of the flow using the Assign card. Then add the flow name to a message in the Compose card and send it to Slack.
Using a helper flow to get the calling flow name
Send the message using a helper flow. The helper flow has information about the flow that called it, including its name.
The main flow below calls the helper flow to send the message.
The helper flow below has information about the flow that called it. The object Caller.name is the flow name. The name is added to a message in the Compose card and sent to Slack.
Using a reusable helper flow to get the calling flow name
Create a reusable helper flow that returns the calling flow name.
The helper flow below gets the calling flow name (Caller.name) and passes it to the Return card.
In the main flow below, the Call Flow card calls the helper flow to get the calling flow name. Then the flow name is added to a message in the Compose card and sent to Slack.
Using this approach, reuse the helper flow in other flows to get the calling flow name.
