Manage notification templates
Templates are stored in the Alertmanager configuration and referenced by name from a receiver’s integration fields.
Create a template
- Click Templates.
- Click Create template.
- Enter a Name, conventionally ending in
.tmpl, for exampleslack-notification.tmpl. Names have to be unique. - Enter the Content. Wrap each definition in
{{ define "name" }} ... {{ end }}. - Click Create template.
The name of the file and the names you define inside it are different things. Receivers reference the defined name, not the filename, so one file can hold several definitions used by different receivers.
Use a template in a receiver
Defining a template changes nothing on its own. To apply it, reference the defined name from the relevant field on a receiver’s integration, such as a Slack integration’s title and text fields.
Refer to Create a receiver.
Edit a template
- Click Templates.
- Select the template.
- Click Edit.
- Change the content and click Update template.
The list shows a preview of each template’s content, which is usually enough to find the one you want without opening each.
Delete a template
- Select the template.
- Click Delete and confirm.
Deleting can’t be undone. Check that no receiver references any of the names defined in it. A receiver pointing at a definition that no longer exists falls back to the default formatting, quietly.
Editing safely
Templates are only exercised when a notification is sent, so a mistake surfaces during an incident rather than at save time. Two habits help:
- Change one thing at a time, and confirm a real notification still looks right before moving on.
- Keep a working copy of a template’s content before a substantial edit, so you can put it back quickly.
The editor is a plain text field, so it won’t catch a syntax error for you. Refer to Template language.


