Building a Bot App for Slack
This article provides step-by-step instructions on how to build a Slack App with bot functions. The algorithm described here applies for:
- MI Slackbot configuration:
- Bursting to a Slack channel without using the MI Slackbot:
1. Access Slack API Page
- Go to https://api.slack.com/apps?new_classic_app=1
- Specify the App Name
- Select your team for "Development Slack Workspace"
- [Create App]
2. Configure Interactive Components
If you are creating a bot app not using the MI Slackbot, skip this step and proceed to Add a Bot User.
Access Features > Interactivity & Shortcuts
- Switch the Interactivity toggle to "On"
- When the Interactivity option is activated, the Request URL field will be displayed
- Enter Request URL (
/slack/message_actionspart of the URL must be exactly as specified
- Request URL is where the Slack server sends requests when Users interact with Slack app components (by clicking on buttons, invoking commands)
- Enter Request URL (
- [Save Changes]
3. Add a Bot User
In order to use your Slack App as a bot, first you have to create a Bot User for it.
Access Features > App Home
- Click [Add Legacy Bot User]
- Enter Display Name (Bot Name) and Default username
4. Grant Permissions
A Slack App's capabilities and permissions are governed by named scopes.
For the Slack App to be able to handle User requests, add permissions from the Conversations group.
Access Features > OAuth & Permissions
- [Add an OAuth Scope]
- From the dropdown, add the following Permissions:
Access user's public channels (
Access information about user’s public channels (
Modify your public channels (
Send messages as ProdBot (
Direct messaging and mentioning the Slack App (
View some URLs in messages (
Add link previews to messages (
Upload and modify files as user (
- Is needed by MI Application to send images to Slack directly
Access information about user’s private channels (
- Access user's public channels (
Navigate to the top of OAuth & Permissions page to proceed with connecting the app to your workspace.
5. Install App to Workspace
- [Install to Workspace]
- Once the app is installed to your workspace, User OAuth Token and Bot OAuth Token are displayed at the top of the page