Problem with Grafana webhook integration with Mattermost: Missing text field

Hi everyone,

I’m having an issue with integrating Grafana’s webhook notifications with Mattermost. It seems Mattermost requires a text field in the payload, but Grafana is sending a message field instead, which causes the webhook to fail with a 400 Bad Request error.

Grafana Version:
11.2.1

Grafana Logs:
Webhook failed with statuscode="400 Bad Request" body="No text specified"

Mattermost Logs:
{"error":"HandleIncomingWebhook: No text specified."}

Steps Taken:

  • In Grafana, I set up a custom webhook notification with a basic JSON payload, trying to directly include a text field as shown below:
    { "text": "slouki slouk" }

  • I’ve also tried custom templates and formatting configurations, but the payload Grafana sends consistently includes a message field rather than text.

Workaround Attempts:

  • I’ve tested using curl to manually send a payload to Mattermost, and that works as expected when text is used.
  • However, Grafana’s automatic webhook keeps generating the message field instead.

Does anyone know if there’s a way to force Grafana to use a text field instead of message in the webhook payload? Or, is there a workaround to make Grafana compatible with Mattermost’s webhook requirements?

Thank you in advance for any help or insights!

1 Like

Hi, I’m new here, but I did just set up a Mattermost notification using a Contact Point with Slack integration with nothing but the webhook URL from Mattermost. From the looks of things Slack protocol uses a “text” field as well: Sending messages using incoming webhooks | Slack