The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Populating alert tags from GCP labels

Konstantin Likhomanov
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!
March 4, 2025

 

We're receiving alerts from GCP through the standard webhook integration.

The payload looks like this:

{
"incident": {
...
"metric": {
"labels": {
"metric_label": "value"
}
}
"policy_user_labels": {
"policy_label": "value"
}
}
}

I want to automatically turn these labels (at least the policy ones) into alert tags. Is there a way to do so?

The "{{_payload.customField}}" syntax for alert properties doesn't seem to support nested fields.

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Vladimir Zholudev
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!
September 16, 2025

Hello @Konstantin Likhomanov 

According to docs it works: https://support.atlassian.com/jira-service-management-cloud/docs/work-with-dynamic-properties/
When I tried to add via + button more then one nested files got same validation error.
But if you add value to Description or tags without adding to Alert properties via "+" button it actually works.
Example:

Started At : {{started_at.toDate()}}
Incident Url : {{url}}
Summary: {{summary}}

Alert Documentation:
{{_payload.incident.documentation.content}}

gcp_policy_name: {{policy_name}}

for tags field gcp labels are under: {{_payload.incident.policy_user_labels.my_awesome_label}}
So nested works when you just use it without adding to Alert properties

0 votes
Eugenio Onofre
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
May 1, 2025

Hi @Konstantin Likhomanov

Welcome to the Atlassian Community!

The {{_payload.customField}} syntax in Opsgenie’s alert field mappings does not support accessing deeply nested fields like out-of-the-box. 

One possible workaround would be to use GCP's alerting system to send webhooks to an intermediate Cloud Function that would:

  • Extract incident.policy_user_labels

  • Format them as a list of tags (e.g., ["policy_label:value"])

  • Send to Opsgenie with those as the tags field directly.

Hope this suggested approach helps.

Best Regards,
Eugenio

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events