-
-
Notifications
You must be signed in to change notification settings - Fork 2
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.
- 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. - Select
Create New App
- Select
From scratch
. We will start building the app from scratch and you can customize it according to your requirements.
- Select a name of the app and the target workspace.
- On the next page, go to the permissions option.
- Scroll down to the Scopes section and under Bot Token Scopes, select
Add an OAuth Scope
- In the search box, search for
chat:write
and select that. The final should look like this.
- Scroll up and on the top, select the option
Install to Workspace
- On the next page, select
Allow
- A
Bot User OAuth Token
will be visible now. Copy this token and use it further with theNotipyer
library.
- Go to your Slack workspace and open the target channel's settings. Go to to the
Integrations
section and selectAdd an App
- 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.