Skip to content

Notifications via Slack

Chirag Jain edited this page Aug 27, 2021 · 2 revisions

For sending slack notifications via Notipyer, we have to create a Slack App which will act as our bot for the workspace.

  1. For creating a new app, head over to https://api.slack.com/ and select Your Apps on the top right. You should be signed in with the email associated with the target workspace.
  2. Select Create New App
  1. Select From scratch. We will start building the app from scratch and you can customize it according to your requirements.
  1. Select a name of the app and the target workspace.
  1. On the next page, go to the permissions option.
  1. Scroll down to the Scopes section and under Bot Token Scopes, select Add an OAuth Scope
  1. In the search box, search for chat:write and select that. The final should look like this.
  1. Scroll up and on the top, select the option Install to Workspace
  1. On the next page, select Allow
  1. A Bot User OAuth Token will be visible now. Copy this token and use it further with the Notipyer library.
  1. Go to your Slack workspace and open the target channel's settings. Go to to the Integrations section and select Add an App
  1. The newly created app must be visible in the list. Select Add

The configuration is complete. Use the Bot User OAuth Token and the channel selected in Step 11 further with the library. Note that you can add the same bot to multiple channels!

Have fun! Caution: If by mistake, the Bot User OAuth Token is publicly available over the internet, Slack will disable the OAuth token and you will have to go through this process again.

Clone this wiki locally