We have created a webhook to send alert notifications into Slack but am getting this error when Opsgenie tries to send an alert.
The slack integration is not an option so we are just leveraging the webhook.
system SystemCould not send [postToUrl] action to Webhook [Slack]. Reason: 400 Bad Request: "missing_text_or_fallback_or_attachments"
Hey Natalie,
The error message "400 Bad Request: 'missing_text_or_fallback_or_attachments'" indicates that your webhook request to Slack is missing required elements in the payload. Specifically, Slack expects the payload to contain one of the following fields: text
, fallback
, or attachments
.
I would recommend using Slack integration, instead of Webhook integration for this case.
When using the Slack integration provided by Opsgenie, the payload format is managed internally by Opsgenie to ensure it meets Slack's API requirements, including the necessary fields like text
or attachments
. This built-in integration is designed to work seamlessly with Slack, avoiding formatting issues that can occur with a custom webhook.
However, when you set up a custom webhook to Slack, you need to ensure the payload structure meets Slack’s expectations, which is why you might see errors like "missing_text_or_fallback_or_attachments" if those fields are missing.
If you prefer an easier setup without dealing with custom payload formatting, using the official Slack integration would be the recommended approach.
Best Regards,
Egor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.