# Cannot make templates work with managed alerts

**URL:** <https://community.grafana.com/t/cannot-make-templates-work-with-managed-alerts/57697>\
**Category:** Alerting\
**Tags:** templating, alerting\
**Created:** [December 14, 2021, 4:33pm UTC](https://community.grafana.com/t/cannot-make-templates-work-with-managed-alerts/57697 "2021-12-14T16:33:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bentobox](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/bentobox/32/20083_2.png) [@bentobox](https://community.grafana.com/u/bentobox)\
**Post date:** [December 14, 2021, 4:33pm UTC](https://community.grafana.com/t/cannot-make-templates-work-with-managed-alerts/57697/1 "2021-12-14T16:33:43Z")

</div>

- What Grafana version and what operating system are you using?  
Using grafana 8.3.2 as a docker container (Ubuntu)  
Older versions are affected as well

- **What** are you trying to achieve?  
I’m trying to use custom templates to have more simple notifications when an alert fires. I’m just interested in the the dashboard/panelURL.

- **How** are you trying to achieve it?  
Setting a custom template for grafana managed alerts

- What happened?  
I get a mail with the status of the alert, but not the dashboard or panel URL (even though they work with the default template)  

- What did you **expect** to happen?  
A mail containing the pannel and dashboard URL

- Can you copy/paste the configuration(s) that you are having problems with?  
{{ define “experimentaltemplate” }}  
Status : {{.Status}}  
Dashboard : {{.DashboardURL}}  
Panel : {{.PanelURL}}  
{{ end }}

- Did you receive any errors in the Grafana UI or in related logs? If so, please tell us **exactly** what they were.  
No error in Grafana UI or logs, the logs said that the notification is sent successfully.

- Did you follow any online instructions? If so, what is the URL?  
The official documentation regarding alerts templates.

---

<div class="post-metadata">

**Author:** ![obiwan](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/obiwan/32/9686_2.png) [@obiwan](https://community.grafana.com/u/obiwan)\
**Post date:** [December 22, 2021, 7:59pm UTC](https://community.grafana.com/t/cannot-make-templates-work-with-managed-alerts/57697/2 "2021-12-22T19:59:59Z")

</div>

I just responded to another post with the same question I would have posted here. The site will not allow me to post the same thing. Take a look at my response here:

> [@New Alert Message Templating Problems](https://community.grafana.com/t/new-alert-message-templating-problems/57803/2):
>
> Can you show the Contact Point that is using this template? I assume you are calling the templates that you want in the Contact Point Title and Contact Point Text Body fields. For example: Contact Point: Name: \<name of contact point\> Title: {{template "name-of-title-template" .}} Text Body: {{template "name-of-body-template" .}}
