How do I get the alert id in the webhook payload in8 alerts?

Hi Grafana Team - how do I get the alert id in the webhook payload in V8 alerts? Since the webhook is sending multiple alerts, I’m not sure how I can apply deduplication(firing vs resolved) to these alerts. Here is what I’m receiving:

    "receiver": "MyWebhook",
    "status": "resolved",
    "alerts": [
        {
            "status": "resolved",
            "labels": {
                "alert": "fire",
                "alertname": "Main DB Memory "
            },
            "annotations": {},
            "startsAt": "2021-07-26T22:26:02.18682019Z",
            "endsAt": "2021-07-26T22:28:02.18682019Z",
            "generatorURL": "",
            "fingerprint": "0353ae2ad87a8775",
            "silenceURL": "<http://localhost:3000/alerting/silence/new?alertmanager=grafana&amp;matchers=alert%3Dfire%2Calertname%3DMain+DB+Memory+>",
            "dashboardURL": "<http://localhost:3000/d/SxpMj-Wnk>",
            "panelURL": "<http://localhost:3000/d/SxpMj-Wnk?viewPanel=2>"
        }
    ],
    "groupLabels": {},
    "commonLabels": {
        "alert": "fire",
        "alertname": "Main DB Memory "
    },
    "commonAnnotations": {},
    "externalURL": "<http://localhost:3000/>",
    "version": "1",
    "groupKey": "{}/{alert=\"fire\"}:{}",
    "truncatedAlerts": 0,
    "title": "[RESOLVED]  (Main DB Memory  fire)",
    "state": "ok",
    "message": "**Resolved**\n\nLabels:\n - alertname = Main DB Memory \n - alert = fire\nAnnotations:\nSilence: <http://localhost:3000/alerting/silence/new?alertmanager=grafana&amp;matchers=alert%3Dfire%2Calertname%3DMain+DB+Memory+>\nDashboard: <http://localhost:3000/d/SxpMj-Wnk>\nPanel: <http://localhost:3000/d/SxpMj-Wnk?viewPanel=2>\n"
}```

Are you looking for the alerting rule UID?

Easiest thing will be to include it as a label. Let me double check the exact syntax

Do I need to create a template to include rule id?

Nope, you can use the labels field at the bottom of the alerting rule CRUD UI.

Labeling may not be the best way, since some alerts might go unlabeled. We’ll have to manually make sure the rule id labels are there, and also ensure that the lables are unique

{{$labels.__alert_rule_uid__}} should get that for you.

> some alerts might go unlabeled
I’m not sure I understand this. Every alert will have some labels accessible to it. We identify unique alert instances by their labels, in fact.

Every alert will have the above label available, too. We add it in the state cache, which is used to power both the UI and notifications