Integrate with Slack

This document is obsolete. You should integrate with Slack using our Slack App. In fact, Slack recommend not sharing test tokens outside your company, which is why this guide probably will be deleted in the near future.

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

Slack Authentication Page

On, 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 log. To do this, name your rule and input a query like illustrated on the following screenshot:

Add HTTP 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

The final result should look like this:

HTTP Rule Dialog

Don't worry about the empty Content-Type and Body. Everything needed to post the message to Slack is embedded into the URL. To learn more about the structure of the URL, jump to Breaking it down

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

Error on Slack

Slack doesn't allow more than a single request per second. If you generate more than one message to per second, not all of them will show up in Slack because of this.

Breaking it down

You should have received a message on Slack already. To learn more about how to specify and extend the configuration for Slack, this is the section for you. Let's start by inspecting the simplest possible Slack URL:$message

The initial part ( points out the method to invoke on Slack. In this case, we want to post a new message (chat.postMessage). The token query parameter contains your access token as found on the API page.

The channel parameter contains the name or the ID of the channel you want to post the chat message to. In the example above, I specify the #general channel, but it can be any channel on your account. Observe how I've URL encoded the # character.

Next up is the text parameter which contains the actual message we want to post to #general. By inserting $message, I tell to insert the title or headline of the logged message. In case of an exception, this will be the exception message generated at your website. supports a range of variables, available on the Rules tab on the log settings.

To add a sender name other than Bot, add a username parameter like this: &

If you want a nice profile icon as well, you can append the following parameter: &icon_url= This tells Slack to show a nice icon next to the chat messages.

This article was brought to you by the team. 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.

See how we can help you monitor your website for crashes Monitor your website