Empty custom message for custom notification template

Using Grafana10.4.1.

Want to be able to customize default notification alert messages inside of teams more like legacy one

  • How are you trying to achieve it?

creating custom notification template

  • What happened?

I’m getting empty message for this custom notification policy

  • What did you expect to happen?
    that I get annotation message= “txt”

  • Can you copy/paste the configuration(s) that you are having problems with?

{{ define "my.message" }}

Annotations:
{{ range .Annotations.SortedPairs }} - {{ .Name }} = {{ .Value }}
{{ end }}

{{ if gt (len .DashboardURL) 0 }} Go to Dashboard: [{{ .DashboardURL }}]({{ .DashboardURL }})

{{ end }}{{ if gt (len .PanelURL) 0 }}Go to Panel: [{{ .PanelURL }}]({{ .PanelURL }})

{{ end }}
{{ end }}

{{ define "my.title" }}
[{{ .Status | toUpper }}: {{ if eq .Status "firing" }}{{ .Alerts.Firing | len }}{{ else if eq .Status "resolved" }}{{.Alerts.Resolved | len }}{{ end }}] {{ .GroupLabels.SortedPairs.Values | join " " }}
{{ end }}
  • Did you follow any online instructions? If so, what is the URL?
    yes