Integrate elmah.io with Slack

Thomas Ardal, June 18, 2015

This post has been adapted as part of our official documentation. To read the most updated version, please check out Integrate with Slack.

Last week, we showed you how to integrate elmah.io with HipChat. This week we take a look at another popular tool for team communication: Slack. Like HipChat, Slack offers an API, making it easy to integrate with elmah.io through the Rules feature.

Start by copying your Slack-token from the API page. We will need this when setting up the integration.

Slack Authentication

On elmah.io, go to the Rules tab beneath your log settings. In this example we want a message on Slack every time a new error is logged in our elmah.io log. To do this, name your rule and input a query like illustrated on the following screenshot:

Add new rule

Hit the Then link and select HTTP request. Input the following values (remember to replace YOUR_TOKEN and YOUR_CHANNEL):

Field Value
Method POST
URL https://slack.com/api/chat.postMessage?token=YOUR_TOKEN&channel=YOUR_CHANNEL&text=$message&username=elmah.io

The final result should look like this:

Finished rule

Click the OK button and add the new rule by clicking Add. This configuration tells elmah.io, to make a HTTP request against the Slack API, every time a new error is logged. The message at elmah.io is shown as the chat message inside Slack:

Slack message


This post was brought to you by the elmah.io team. elmah.io is the best error management system for .NET web applications. We monitor your website, alert you when errors start happening and help you fix errors fast.

Monitor your website



Comments