Slack
Requirements
- Set the
externalUrl
field in botpress.config.json
Steps
Create the app on Slack
Go to your apps page
Click on
Create new app
then give it a name
Configure your bot
- Edit
data/bots/YOUR_BOT_ID/config/channel-slack.json
(or create it) and set
- enabled: Set to
true
- signingSecret: Take the value
Signing Secret
on the pageBasic Information
- useRTM: false (true if you have a legacy app)
- Restart Botpress
Configure Callback on Slack
Open the page
Event Subscriptions
, then turn the switch toOn
Set the request URL to:
EXTERNAL_URL/api/v1/bots/YOUR_BOT_ID/mod/channel-slack/events-callback
- Replace EXTERNAL_URL by the value of
externalUrl
in your botpress.config.json - Replace YOUR_BOT_ID by your bot ID
Under
Subscribe to bot events
addmessages.im
andmessages.channels
(you can also add other types of messages if you want)Open the page
Interactive Components
, then turn the switch toOn
Set the request URL to:
EXTERNAL_URL/api/v1/bots/YOUR_BOT_ID/mod/channel-slack/bots/YOUR_BOT_ID/callback
- Replace EXTERNAL_URL by the value of
externalUrl
in your botpress.config.json - Replace YOUR_BOT_ID by your bot ID
Open the page
OAuth & Permissions
and addchat:write
underScopes
Install the app by clicking the
Install App to Workspace
button
Finish configuring your bot
- Return to
data/bots/YOUR_BOT_ID/config/channel-slack.json
and set
- botToken: Take the value Bot User OAuth Access Token on the page OAuth & Permissions
- Restart Botpress