Custom Alert Templates Not Working

I am attempting to create a message template for my alerts. My goal is a simplified message using labels. I will paste my template below and the message I receive in slack. The ‘variable’, ‘location’, etc are names of labels.

{{ define "Alerting Template" }}
Alert: {{ .Labels.variable }} on {{ .Labels.location  }} is above threshold of {{ .Labels.threshold }}. For more detail, {{ .PanelURL }}.
{{ end }}

This is the output:

Alert: <no value> on <no value> is above threshold of <no value>. For more detail, <no value>.

I’ve tried to follow the default template and the documentation here. Is there something I am missing?

I am currently using OS 8.5 (and will soon be upgrading to 9).