I had to add my bot to a new Slack today (8 new users!) and forogtten how. My bot isn’t a full Slack App, it’s just a bot user, which in Slack terms is a “custom integration” tied to my personal user account for Nelson. Here’s the steps to set it up:
- Log into the Slack as Nelson, in the Web UI
- The account needs permissions to add custom integrations. You get this by default if you’re an Admin, otherwise it needs to be added under Team Settings / Permissions
- In upper left corner, click the down arrow near the Slack name to get to the menu for preferences / etc. Choose the “Apps & Integrations” option under the Slack team’s menu.
- Ignore the confusing app directory. Click “Manage” in upper right.
- Click Custom Integrations
- Click Bots
- Click Add Configuration
- Fill in the form and save it. Also copy the API token.
- I had a problem with a new Slack where I couldn’t add a Bot user, I think the UI acts differently for the very first integration. I managed to create the bot though by hitting this link: https://my.slack.com/services/new/bot
- Create a channel for the reports to go to. (Or use an existing one.)
- Invite @gamebot to that channel.
That’s the Slack UI process for adding my bot. Kind of a mess, but it’s because I’m using the old bot interface and not the new fancy Slack App integration system that I should be.
After all that setup, then it’s on to Python code to find the channel token. Then set up the destination and subscriptions via code / SQL. All so manual, must build tools.
Speaking of tools I’m pretty convinced Django is the way forward. With a web UI, not some Slack interactive thing.