
Hello,
I'm trying to send an email when a trigger is happenning in PagerDuty. So I'm using the template provided for this.
The problem I have is that left as is, this will generate an email for every single incident generated at our Pager Duty. We have hundreds of services there so obviously this doesn't work for me, since I only want to get an email if an incident is triggered on a single service.
So far I tried changing the trigger condiction on the pager duty block of, with something like this
@equals(triggerBody()?.incidents[‘{service}’], ‘knowledge-administration-service-prod’)
But this seems to be wrong syntax because the Flow Checker is telling me this is wrong
Checking documentation https://docs.microsoft.com/en-us/connectors/pagerduty/#incidentsresponse I see this returns an incidents response object, but I see no examples on how to access the service element within an Incident object just to make sure that the service will be the one I want https://docs.microsoft.com/en-us/connectors/pagerduty/#incident
Any idea if this can be accomplished? If yes, how? What's wrong on my syntax? Just not sure how to access an element from the array and check the service property
Thanks!