# Slack Integration

This article explains how to integrate Slack for receiving alert notifications from Telmai application

## Instructions <a href="#slackintegration-instructions" id="slackintegration-instructions"></a>

To send notifications to a Slack channel:

* Create a new Slack app with sufficient privileges to post messages to a public Slack channel
* Create a new alert channel for slack communications in Telmai

#### Create a new Slack app <a href="#slackintegration-createanewslackapp" id="slackintegration-createanewslackapp"></a>

1. Navigate to [Slack API apps](https://api.slack.com/apps). The page opens in a new tab
2. Sign in or create an account
3. Select **Create an App**
4. Set **App Name** to "**Telmai Notifier**”
5. Select the **Development Slack Workspace** where you'd like the Slack Bot to post messages, and then click **Create App**.
6. In the navigation panel, select **OAuth & Permissions**.

   ![](https://604868671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkO3-a8YVu1iq1jP__S%2Fuploads%2FuB2ZHf4YDgB2MCEyYiIC%2F679378968.png?alt=media)
7. Navigate to the **Scopes** section.
   1. Under **Bot Token Scopes**, click **Add an OAuth Scope** and enter:
      1. `chat:write`
      2. `chat:write.public`

         ![](https://604868671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkO3-a8YVu1iq1jP__S%2Fuploads%2F59vw3WGQc8GZkVQ87yVx%2F679477273.png?alt=media)
8. Scroll to the top of the **OAuth & Permissions** page and click **Install App to Workspace**.
9. In the confirmation dialog, click **Allow**.
10. Copy the **Bot User OAuth Access Token** for use in the Telmai channel.

    ![](https://604868671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkO3-a8YVu1iq1jP__S%2Fuploads%2FTKiKlePff04WDQgaESZO%2F692092947.png?alt=media)

#### Create a slack alert channel in Telmai <a href="#slackintegration-createaslackalertchannelintelmai" id="slackintegration-createaslackalertchannelintelmai"></a>

In this section, you create a new Alerts channel to receive Telmai notifications via Slack

1. Create a Slack channel
   1. Click on “**Alerting Policies**” in the left hand menu<br>

      <figure><img src="https://604868671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkO3-a8YVu1iq1jP__S%2Fuploads%2FGnQJlXRDVtutwf0iJsts%2Fimage.png?alt=media&#x26;token=14dc70fc-366c-4cd9-a7b3-ce084753df9e" alt=""><figcaption></figcaption></figure>
   2. Click on “Manage Alert Channels”<br>

      <figure><img src="https://604868671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkO3-a8YVu1iq1jP__S%2Fuploads%2F76cHRYk43oHYsq3nOesP%2Fimage.png?alt=media&#x26;token=7d9fc2d2-1b6d-430f-a8d5-a94aedb097de" alt=""><figcaption></figcaption></figure>
   3. Click on “+ Alert Channel”

      <figure><img src="https://604868671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkO3-a8YVu1iq1jP__S%2Fuploads%2FIOlEqSybzRfwM3L3m2W2%2F692125713.png?alt=media" alt=""><figcaption></figcaption></figure>
   4. Select “Slack” in Alert Channel Type drop down
   5. Enter Channel Name
   6. Enter token which is copied above (In step 10)
   7. Enter the slack channel you want to receive alerts. (You can add multiple channels by clicking on “Add”)

      <figure><img src="https://604868671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkO3-a8YVu1iq1jP__S%2Fuploads%2FImpBwLihOfmyvRIhrRnD%2F691896350.png?alt=media" alt=""><figcaption></figcaption></figure>
   8. Click on “**Validate**” Telmai will send a test message to the provided channels
   9. If everything looks good, click on “**Save**”
2. Select this channel in alert settings so it can be is used for notifications.
