Customize body of webhook contact point in alerting

With the webhook contact point of Grafana alerting I want to trigger a Twilio flow. For this I need to add a ‘To’ and ‘From’ parameter (example in curl can be found below)

curl -X POST "https://studio.twilio.com/v1/Flows/FW9d816f0b90d2a10b913868462e339d29/Executions" --data-urlencode "To=+1646221xxxx" --data-urlencode "From=+1331481xxxx" --data-urlencode "Parameters={\"name\":\"zeke\"}" -u ACCOUNT_SID:AUTH_TOKEN

Where can I add these parameters? I’m tried it with a template but I’m unable to add a template to a webhook.

I’m using a self hosted Grafana V19

Thanks in advance

welcome to the :grafana: forum, @brecht

I believe this is only place where you can add args / parameters to your webhook request:

If this isn’t enough then you might want to consider filing a feature request:

for feature requests to Grafana OSS we ask the community to make a post here, in GitHub Discussions. It can then get upvoted by fellow users. Devs use this to gauge interest in new features:

I would check and make sure someone hasn’t already started a thread:

Hi

Kindly share if any update about this request. Customize body of webhook contact point in alert.

I am trying to upload payload to servicenow to create incident when grafana alerts.

Thanks.

Hi! This is not possible at present, but it is something that is being discussed within the Alerting team. We haven’t decided how it should work and so I don’t have a date of when this feature might be available.

Hello @georgerobinson,

Have we made any progress on this feature? do we have any alternate approach which we can use in the meanwhile? - The idea is to Trigger Post Webhook call with certain parameters whenever an alerting situation happens.

Regards,

Hi! I’m afraid we don’t have an update to share on templating webhooks in either Grafana or Alertmanager. I think the current recommendation is to run a service in between Grafana and the receiving service that can translate the JSON as required.

Hi @goetschhofer ,

What about something as simple as this? Will this currently work with grafana alert?

curl \
  -X POST \
  -H "Authorization: Bearer <MY TOKEN>" \
  https://api.github.com/repos/<my repo> \
  -d '{"ref":"LINK","inputs":{"tenant_id":"aaa"}}'

Steven