# Integrating Error Notifications to Slack

### Overview

App notifications will inform you about your application’s errors through a channel of your choice. In this example, we will create a Slack app and link it to an App Notification so that messages are posted to a Slack channel.

**Pre-requisites:**

Before starting the configuration, create an #app-errors channel to receive the error messages in Slack.

### Creating a Slack App

To post messages from apps into Slack, a Slack App must be created with an Incoming Webhook.&#x20;

1. Go to  [https://api.slack.com/messaging/webhooks#getting\_started](https://api.slack.com/messaging/webhooks#getting_started) and click on Create your Slack app and then choose to create it from scratch. A modal will show up prompting you to name your app and then pick the workspace you’ll be using. Then click on Create App.

![C.png](https://1191388742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhOn9CLWoV9VfJeM5EDAa%2Fuploads%2Fgit-blob-822d6443924ed2f88b3016118752c30302acaa3d%2Fintegrating-error-notifications-to-slack-v1715-0.png?alt=media)

2. Turn Incoming Webhooks on.

![organizing info](https://1191388742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhOn9CLWoV9VfJeM5EDAa%2Fuploads%2Fgit-blob-b07e88084e7b9975c284a6dd44d0b79c0f4987c9%2Fintegrating-error-notifications-to-slack-v1715-1.png?alt=media)

3. Enter the Slack channel where notifications will be posted to.

![organizing info](https://1191388742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhOn9CLWoV9VfJeM5EDAa%2Fuploads%2Fgit-blob-9281edebf00a918d90372074f89defcc41a61e41%2Fintegrating-error-notifications-to-slack-v1715-2.png?alt=media)

4. Scroll to the button to find the Slack app URL.&#x20;

![](https://1191388742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhOn9CLWoV9VfJeM5EDAa%2Fuploads%2Fgit-blob-f641084b5077af045ae3ea4c8d37392d7e481b8d%2Fintegrating-error-notifications-to-slack-v1715-3.png?alt=media)

We recommend pasting the URL in the channel’s topic since it will be needed later on to create the App Notifier in the Console.

### Adding the App Notifier to your Org

In the Console, go to Settings > Notifications and click on Create new.

![organizing info](https://1191388742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhOn9CLWoV9VfJeM5EDAa%2Fuploads%2Fgit-blob-e8f72761c9c06b20cfb1d60c3f77a9998786e90d%2Fintegrating-error-notifications-to-slack-v1715-4.png?alt=media)

Choose a name for it, select Slack as Destination, paste the Slack app URL you have just created and click Create.

![](https://1191388742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhOn9CLWoV9VfJeM5EDAa%2Fuploads%2Fgit-blob-6ab55fd125e6cd7ba630efbdb13b39a84b2c2b60%2Fintegrating-error-notifications-to-slack-v1715-5.png?alt=media)

A Send Test button will show up for you to click and receive a Test text on the #app-errors channel:&#x20;

![](https://1191388742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhOn9CLWoV9VfJeM5EDAa%2Fuploads%2Fgit-blob-7f59258a36159d4a44cb948a0cf52f3bd0e50f7b%2Fintegrating-error-notifications-to-slack-v1715-6.png?alt=media)

### Adding the App Notifier to your app

When publishing your app, click on Notifications and select the App Notifier you have previously created. Finally, click on Publish.

![](https://1191388742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhOn9CLWoV9VfJeM5EDAa%2Fuploads%2Fgit-blob-d0a2a7c9314cda91eca671ea29a8fcb98c2721d4%2Fintegrating-error-notifications-to-slack-v1715-7.png?alt=media)

From now on, all error messages will be posted into the Slack #app-errors channel.
