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: Enhancement of Webhook Custom Body Functionality #238

Open
sqkkyzx opened this issue Feb 3, 2025 · 2 comments
Open

Feature: Enhancement of Webhook Custom Body Functionality #238

sqkkyzx opened this issue Feb 3, 2025 · 2 comments

Comments

@sqkkyzx
Copy link

sqkkyzx commented Feb 3, 2025

Feature: Enhancement of Webhook Custom Body Functionality

My Use Case

I would like to configure different colors for TRIGGERED and RESOLVED notifications to make Alerts more prominent.

Expected Solution

Support for a custom webhook body that utilizes a template language similar to Jinja2, allowing for conditional statements like {% if status == "RESOLVED" %}.

Acceptable Alternatives

Allow for different triggers to be configured for TRIGGERED and RESOLVED in the "Choose Triggers" option.

@rajnandan1
Copy link
Owner

I am thinking I would give the ability to write a custom transformer function for this. What do you think? The response should be the webhook payload

@sqkkyzx
Copy link
Author

sqkkyzx commented Feb 4, 2025

I am thinking I would give the ability to write a custom transformer function for this. What do you think? The response should be the webhook payload

Is it similar to eval?

I'm not sure if you're considering replacing "template rendering" with "custom functions," or if you're thinking about adding the functionality of "custom functions."

I believe this is a viable and powerful solution, but it's not very user-friendly. Of course, it could perfectly solve my problem!

The current "template rendering" feature is great; it just isn't powerful enough for my specific use case. Simply replacing it with "custom functions" might actually undermine the current usability.

Perhaps allowing users to switch freely between "template rendering" and "custom functions" would be a good idea.

Additionally, I'm only proposing this based on my personal use case, and I'm not sure if others would need it. In fact, I'm already considering directly modifying the project to add the tigger type that I use.

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

No branches or pull requests

2 participants