Error when templating grafana alerts

I am trying to template a grafana alert:

{{ define "template" }}
host {{ .Labels.alertname }} has been caused by {{ }} 
{{ .Annotations.Summary }}
{{ end }}


But the alert is only sent up to the first label

This is the error log:

logger=alerting.notifier.slack level=error msg="Missing receiver"
logger=alerting.notifier.slack level=error msg="Missing group labels"
logger=alerting.notifier.slack lvl=warn msg="failed to template Slack message" err="template: template:3:15: executing \"template\" at <.Labels.alertname>: can't evaluate field Labels in type *channels.ExtendedData"

If I remove the template, the alert works fine

Any ideas what could cause this?

Can you confirm: are you using the new Grafana Alerting platform (first released in Grafana 8) or the legacy alerting platform? I should note that the legacy platform is no longer actively developed:

I am using the new Grafana Alerting platform