My goal is to create a alert that sends a certain message when the incident opens and a slightly different one when the incident closes. I was looking at using a webhook however I was having trouble changing the webhook payload on open/close of the incident. Is there a way to achieve my desired outcome?
I tried the following in the payload for the webhook
“text”: $EVENT_STATE == “OPEN” ? “incident open” : “incident closed”
Any suggestions welcome. Even if I have to create 2 webhooks one for open and one for close.