Integrate Slack using Flow Actions

Slack invocable actions provide portable functionality that can be invoked via REST or used as point-and-click building blocks in Flow Builder, Bot Builder, and Strategy Builder.

There are many use cases for these actions:

  1. You can use Flow to streamline Slack administration. The package comes with a flow called Slack Administrator that streamlines the management of Slack channels and shows how these actions can be combined together.

Here’s what this flow looks like in the Flow Builder:

Watch this video to see it in action:

Use Case 2

Trigger on a Schedule or a Record Change using Flow Builder and use these actions to do something in Slack. Note that you currently have to use the dynamic technique shown here. Basically, you put the trigger in flow 1 and have it dynamically launch flow 2, where you put your Slack actions. (There are plans in the works for improving this situation)

Use Case 3

Spinning up channels for particular circumstances, such as the creation of a case or a deal opportunity. Your flow can create the channel and invite the right group of people. For this, you’ll probably want to have a User field that contains the user’s Slack Id.

How It Works

To learn about the different inputs, take a look at api pages like this one:

To create rich Slack messages, you assemble JSON strings in the Slack format, which they call Block Kit. You then pass the strings into these actions. You can construct them here ( and then copy and paste the json (everything inside the [ ]) into a Text Template or action input. You can insert merge fields (references that look like {!this}) and Flow will replace the merge fields with the appropriate values when the flow is executed. If you don’t want to deal with blocks, you can send plain text in the ‘text’ input. Note that the ‘text’ input is used in notification pop ups.

thread_ts is used when you want to instruct Slack that the message you’re posting is a response to a previous message. If you know the thread_ts value for the previous message (it’s basically a message id) and you provide it, Slack will make the new message a child of the old message.


Step 1) Install Required Package Dependencies

Target orgs need to have the following package dependencies installed, in order:
Install: Flow Actions Base Pack
Install: Flow Screen Components Base Pack
Install: Datatable

Note however that these dependencies are only used for the sample harness flow “Salesforce Slack Administrator”. (If you’d rather have a package that doesn’t include this flow and require these dependencies, let us know.)

Step 2) Install the Slack Actions

Version 1.1.0 Unlocked 3/8 (bug fixes)

Step 3) Obtain an Authentication Token from your Slack Workspace

In order for your Slack Actions to be allowed to interact with your Slack workspace, you need to generate an authentication token. They look like this:

Notice the picklist in the upper left. It is set to a specific Slack Action (in this case, the app is called ‘InvocableActionBridge’. If you have sufficient permission to create an app on the workspace you’re targeting, you can generate a token by creating your own Slack App from here:

“Creating an App” may sound intimidating, but this isn’t a situation where you need to write code or create logic. A Slack App can be as simple as what we’re needing here: a simple token generator that gives you a token that you can use to access Slack.

View Source


Old version

Version 1.0.0 Unlocked 3/1

Skip to toolbar