Creating a notification channel that invokes a function
Written by
Updated at August 21, 2026
You can specify a function in Cloud Functions as the notification method. This function will be invoked when an alert fires or in an escalation as a standard notification channel.
To set up notifications with Cloud Functions:
Management console
- In the management console
, select a folder. - Navigate
to Cloud Functions. - Create a function and a function version.
- In the settings, enable asynchronous invocation.
- Create a service account with the
functions.functionInvokerandfunctions.viewerroles. You will need it to invoke the function. - On the Monium
home page, select Alerts and SLOs → Notification methods on the left. - In the top-right corner, click Create and select Notification Channel.
- Enter a name for your notification channel.
- Optionally, specify the alert severity levels for which the channel will operate by default.
- In the Method field, select
Cloud Function. - In the field that appears, select the folder containing the function from Cloud Functions.
- In the Service account field, select an account to run the function.
- Click Save.
Message format when invoking a function in Cloud Functions
When invoking a function in Cloud Functions, the alert or escalation will forward a JSON message with alert info to the event argument in the entry point:
{
"alertId": "",
"alertName": "",
"labels": {
"key1": "value1",
"key2": "value2"
},
"folderId": "",
"alertStatus": "",
"annotations": {
"key1": "value1",
"key2": "value2"
}
}
Where:
alertId: ID of the triggered alert.alertName: Name of the triggered alert.labels: List of labels inkey: valueformat for multialerts.folderId: Folder ID, must be empty.alertStatus: Alert status.annotations: Values of annotations for the triggered alert (key:valuedictionary).
For a function invocation example, see Webhook using Cloud Functions.