Set up Slack authorization for Postman Flows
To run Postman Flows templates that use Slack, you need to set up authorization between Slack and Postman. You can do this by creating a Slack app with a bot user and storing its token as an environment variable in Postman.
Before you get started, you need:
- A Slack account
- A Slack workspace
- A Postman environment to run the flow
Create a Slack app and bot
To create a Slack app and bot user to use with Postman Flows, do the following:
-
Log in to the Slack developer console.
-
Select Create an App, and then select From scratch.
-
For App Name, enter a name for the app.
-
Select the Slack workspace where you want to install the bot, and then select Create App.
-
Under Features, select Bot Users > Add a Bot User.
-
Enter a display name for the bot, and then select Save Changes.
-
In the sidebar, select OAuth & Permissions. Assign the following scopes to the bot:
chat:writechannels:readgroups:readchannels:joinim:readincoming-webhookmpim:read
-
Select Save Changes.
-
Install the app to your workspace.
-
After installation, you can access the OAuth token for the bot. Copy the token, and then save it as a variable named
Slack_Bot_Tokenin your Postman environment.
Invite the bot to a Slack channel
-
Open your Slack workspace.
-
Select the Slack channel where you want the bot to post messages.
-
View the channel details to locate its channel ID.
-
Copy the channel ID, and then save it as a variable named
Slack_Channel_IDin your Postman environment. -
Open the channel where you want to add the bot. Enter
/invite @YourBotName, replacing YourBotName with the username you gave the bot.
Next steps
After you’ve completed your Slack configuration, you can return to the flow template or set up authorization for another integration in Postman.