Improvement of the Opsgenie notification title

Temgoua Nguefack Christian Midrel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 27, 2025

Hello, We are trying to improve the title of the Opsgenie notifications.

We have a payload that is sent to Opsgenie, and we would like to include a field from this payload in the notification title. {{_payload.ProblemDetails.impactedEntities.get(0).entityId.type}}

However, we are finding it impossible to retrieve the (type) element in question. We followed this documentation: https://support.atlassian.com/opsgenie/docs/dynamic-fields-in-opsgenie-integrations/

We tried using regex expressions to extract this field from the payload, but the result was an empty field. We are also wondering if there is a limit on the number of characters in the title.

We noticed that when we used {_payload.ProblemDetails.impactedEntities.get(0).entityId.type}}, we received an error in Opsgenie, but when we used {_payload.ProblemDetails.impactedEntities.get(0)}, we got a result, although it was not usable in the title.

Can you tell us if it is possible to extract fields from a JSON object within the payload?

1 answer

1 vote
Robert
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 28, 2025

Hey @Temgoua Nguefack Christian Midrel !

At this time, using get() will "stop" the ability to descend further into the object. That is, once you use the get() method you'll have to use some type of string processing method to continue extracting data, treating the result of the get() as a string.

So in your example, something like

{{_payload.ProblemDetails.impactedEntities.get(0).extract(/someRegexHere/)}}

Should be able to extract something more specific after getting the first element of the array. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events