Skip to content

Slack setup

Erick Ruiz de Chavez edited this page Oct 29, 2020 · 6 revisions

This setup is required only the first time the Slack bot is created. Ideally, you will use a secondary Slack Workspace to avoid event collisions (multiple bots handling same event), functionality overlap, channel & notification spam, etc.

Please read the full page and start the local app before starting with this guide. Also, if you have not done so, read and follow the Quick start guide on the README.md file.

Slack Setup

  1. Go to https://api.slack.com/apps

Screen Shot 2020-10-29 at 12 36 56 PM

  1. Select Create New App button, fill in all the required fields, and click on Create App.

Screen Shot 2020-10-29 at 12 36 51 PM

  1. Go to OAuth & Permissions, scroll down, and add the following Bot Token Scopes:
  • channels:history
  • channels:read
  • chat:write
  • reactions:read
  • users.profile:read
  • users:read
  • users:read.email

Screen Shot 2020-10-29 at 12 46 33 PM

  1. Once these scopes are in place, scroll up and click on Install App to Workspace.

Screen Shot 2020-10-29 at 12 46 44 PM

  1. After the app is correctly installed, copy your bot token, save it to config.ini

  2. On a new browser tab/window, open the ngrok inspector and copy the public https URL.

Screen Shot 2020-10-29 at 12 49 22 PM

  1. Go to Event Subscriptions and turn it on. Paste the ngrok URL into the URL field, it must get the green verified checkmark to work.

Screen Shot 2020-10-29 at 12 50 13 PM

  1. Click on Subscribe to bot events and subscribe to the following events:
  • message.channels
  • reaction_added
  • reaction_removed

Screen Shot 2020-10-29 at 12 54 31 PM

  1. Click on Save Changes.

  2. In your Slack Workspace, invite the bot to a channel /invite @botname and test by sending a message like: test ++

Done!

Important Notes

  • ngrok URLs expire after 8 hours, that means you will need to restart your local development server after that time.
  • Every time ngrok starts will assign a new URL, therefore you will need to update the URL used in "Event Subscriptions".
Clone this wiki locally