External Link in alert template

Is it possible to add link to some external webside into alert template?
I tried use <a … or <https:// /> (from Configuration example for alerts templating - Telegram and Slack)
Also tried Define link on Grafana Template - #2 by georgerobinson

But in alert it is shown as string.

Alerts goes to Ms Teams.

1 Like

It definitely works, you just have to use MS Teams specific markdown.
Have a look at this answer: Documentation of Alert Templating in Serious Need of Improvement! - #77 by bLd759

Do I understand it correctly, that you have to use MS teams connector with webhoock to use those markdowns?
We are using Email connector. We don’t have acces to our MS Teams webhoock.

No I just assumed you were using Teams because you said

Email templates are working pretty differently and templating these is very hard, I would suggest to keep the email message default template and just create a message template like this one:

{{ define "mail_title" }}
  {{ if gt (len .Alerts.Firing) 0 }}
  🔥 {{ len .Alerts.Firing }} alert(s) firing
  {{ end }}
  {{ if gt (len .Alerts.Resolved) 0 }}
  ✅ {{ len .Alerts.Resolved }} alert(s) resolved: {{ .Labels.alertname }}
  {{ end }}
{{ end }}

Then just set this template in the Subject like this
image

It is not very customized but it works fine. Unfortunately doesn’t allow to add custom links.
You can also trick by adding your custom URL as a label in each alert (but it’s not very clean way to do).

I would suggest you rewrite the title to [External Link in email alert template]