Skip to main content
Use the example templates below as inspiration when creating custom webhooks.

Discord Payload Template

To learn more, visit Discord’s Developer Documentation.

Discord Template Example

Incident.io Payload Template

To learn more, visit Incident.io Documentation.

Incident.io Template Example

OpsGenie Payload Template

OpsGenie requires that an “Authorization” header be included with the value of the header in the format: GenieKey YOUR-APIKEY
To learn more, visit OpsGenie Documentation.

OpsGenie Template Example

Grouped Trigger Payload Template

Triggers with an alert type of "on_group_change" report which groups changed during an evaluation, instead of listing every group currently over the threshold. Use .Result.NewlyTriggeredGroups and .Result.RecoveredGroups to send a payload that names only what changed. To learn more, visit Custom Webhook Variables. This example is not specific to any destination, and shows two ways to include group data. The newly_triggered field passes the groups through as-is with toJson, while the recovered field loops over each group to build a readable label from its key and value pairs.

Grouped Trigger Template Example

When looping over a list to build JSON, use {{ if $i }},{{ end }} to separate entries. This places a comma before every entry except the first, which keeps the payload valid when the list is empty or contains a single group.