Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Enhance custom webhooks to support custom message formats for request bodies #818

Open
AWSHurneyt opened this issue Nov 29, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@AWSHurneyt
Copy link
Contributor

Is your feature request related to a problem?
Currently, custom webhook channels directly use the message string as the request body when sending a notification. However, some webhooks require other formats for the request body. E.g., Google chat require a { text: "message content" } format (documentation link) similar to Slack webhooks.

What solution would you like?
Custom webhooks should be able to support custom message formats to accommodate more webhook types.

@fbarbeira
Copy link

Mattermost is also affected with this issue:

[2024-02-26T08:12:41,734][ERROR][o.o.n.c.t.WebhookDestinationTransport] [os-manager] Exception sending webhook message b8pC5I0BK_x004ISOKmL: org.opensearch.notifications.spi.model.MessageContent@5f7e7f1
java.io.IOException: Failed: {"id":"model.incoming_hook.parse_data.app_error","message":"Unable to parse incoming data.","detailed_error":"invalid character 'T' looking for beginning of value","request_id":"yr5iwditu3rnurdh8yrjp3no3o","status_code":400}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants