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.
Before starting the configuration, create an #app-errors channel to receive the error messages in Slack.
To post messages from apps into Slack, a Slack App must be created with an Incoming Webhook.
- Go to 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.
- Turn Incoming Webhooks on.
- Enter the Slack channel where notifications will be posted to.
- Scroll to the button to find the Slack app URL.
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.
In the Console, go to Settings > Notifications and click on Create new.
Choose a name for it, select Slack as Destination, paste the Slack app URL you have just created and click Create.
A Send Test button will show up for you to click and receive a Test text on the #app-errors channel:
When publishing your app, click on Notifications and select the App Notifier you have previously created. Finally, click on Publish.
From now on, all error messages will be posted into the Slack #app-errors channel.
Updated 8 months ago