-
Notifications
You must be signed in to change notification settings - Fork 13
Install Slack Bot via Slack modern app
shayaantx edited this page Jan 11, 2025
·
2 revisions
- Existing slack workspace (google how to set one up)
Installing this slack bot has a few quirks. We used to rely on RTM, but since the deprecation of classic apps, modern apps are preferred, and RTM is discouraged (probably even more limited). So now we rely on "Socket Mode" so we can avoid users having to expose a public redirect url to access the slack events API.
We make use of two slack tokens: the bot and user token.
Installing through slack is done through a custom url via slack apps.
- Start by going here https://api.slack.com/apps You will see the below screenshot
- Create the app "From scratch"
- Name your app whatever you want and pick your workspace, then click create app
- Then on the main app page find "Socket Mode" and enable it
- Create an "App-Level token" and store that token for later. The token must contain the "connections:write" scope
- Click the "OAuth & Permissions" under "Features" in the left side menu.
- Scroll down to "Scopes" section and add the following Bot Token Scopes
- Then scroll up to "OAuth Tokens" section and install to your workspace, once you install you should have an "Bot User OAuth Token" (starting with xoxb-*). Save this for later
- Next go to Features -> Event Subscriptions, you need to add "Bot User Event" 9.5. Add following events:
- message.channels
- reaction_added
- reaction_removed
- Configure slack tokens in botdarr (either in your docker setup or manually in config file)
- Once you've installed the app to your workspace, go to workspace, and pick the channel(s) you plan on configuring botdarr for and @ your bot in that channel (which will invite the bot to the channel). WITHOUT this step, botdarr will fail to send messages and receive messages.