How do I properly configure a Notification Target/Webhook Destination with Slack/Mattermost?

When configuring a Webhook Destination (And similarly, a Notification Target), to send to either Slack or Mattermost, I am getting the following error: “Received status code=400, method=POST, url=Customize your workspace | Slack…”

The Status Code 400 leads me to believe that it is a configuration error, so what would I need to change?

Looking at Slack’s Webhook API Documentation:

As well as Mattermost’s Documentation:

Both require a Content-Type of application/json, and a POST Body of {"text": "Hello World!"}

Under General Settings, you will be to set the Format to Custom

Once you set it to Custom, it will allow you to set the Body format (Source Expression) as well as Content_Type.

For the Source Expression, set the value to: {"text": "${_raw}"}
The above will need to be wrapped in Backticks, the formatting here isn’t reflecting as such.

For the Content-Type, set it to: application/json

Example Screenshot below:

1 UpGoat