Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Slack Webhook integration error

Natalie Nguyen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 8, 2024

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  System

Could not send [postToUrl] action to Webhook [Slack]. Reason: 400 Bad Request: "missing_text_or_fallback_or_attachments"

 

1 answer

1 vote
Egor
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 10, 2024

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events