I created this thin Slack bot to demonstrate how easy it is to automate your repetitive actions using a bot
A thin Slack bot using github.com/shomali11/slacker to fork from for your custom slack bot.
Name | Description |
---|---|
SLACK_BOT_TOKEN | Bot tokens represent a bot associated with the app installed in a workspace |
SLACK_APP_TOKEN | App-level tokens represent your app across organizations, including installations by all individual users on all workspaces in a given organization |
- go to https://api.slack.com/apps/
- create an app from scratch on brcm-bsg-ims-nis-ses workspace
- generate an app-level token with connections:write scope and retrieve your app token
- add collaborators
- go to 'OAuth & Permissions'
- add the following Bot token scopes
- app_mentions:read
- channels:history
- chat:write
- groups:history
- im:history
- mpim:history
- add the following Bot token scopes
- chat:write
- go to 'Socket mode'
- enable it
- go to 'Subscribe to bot events' and add message.im
- click 'Request to install'
- retrieve your bot user token
- got to 'Install app' and install the app
app-name
https://api.slack.com/apps/tbd/ on workspace tbd
App token = xapp-1234
Bot token = xoxb-1234
app-name-debug
https://api.slack.com/apps/tbd/ on workspace tbd
App token = xapp-4321
Bot token = xoxb-4321
makefile build
docker run -e SLACK_APP_TOKEN="xapp-1234" -e SLACK_BOT_TOKEN="xoxb-1234" myrepo/thin-slack-bot:1.0.0
Your containerized Slack bot should be deployed on a workload to provide availability
It is recommended to create a CI pipeline to automate deployment