I have created the following notification template in grafana dashboard.
<code>{{ define "test_template" }}
{{ if gt(len .Alerts.Firing) 0 }}
{{ range .Alerts }}
**subject**: {{ .Annotations.summary }}
**description**: {{ .Annotations.description }}
{{ end }}
{{ else }}
**subject**: issue_resolved
**description**: issue_resolved
{{ end }}
{{ end }}
</code>
<code>{{ define "test_template" }}
{{ if gt(len .Alerts.Firing) 0 }}
{{ range .Alerts }}
**subject**: {{ .Annotations.summary }}
**description**: {{ .Annotations.description }}
{{ end }}
{{ else }}
**subject**: issue_resolved
**description**: issue_resolved
{{ end }}
{{ end }}
</code>
{{ define "test_template" }}
{{ if gt(len .Alerts.Firing) 0 }}
{{ range .Alerts }}
**subject**: {{ .Annotations.summary }}
**description**: {{ .Annotations.description }}
{{ end }}
{{ else }}
**subject**: issue_resolved
**description**: issue_resolved
{{ end }}
{{ end }}
In the Microsoft teams contact point settings, I am trying to parse,
the value of the subject key in test_template in Title section and
value of the description key in test_template in Message section but I am receiving any empty message in the microsoft teams.
Now, how to parse the subject and description fields of test_template named notification template accurately in contact point settings of the grafana alerting ?