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.

1 answer

0 votes
Eugenio Onofre
Community Champion
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

Suggest an answer

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

Atlassian Community Events