Usage of {{ .StartsAt }} in notification template

I am trying to use {{ .StartsAt }} in template as below
image

But getting error as below while previewing.
image

Can someone please help here.
Thanks in advance.

@jangaraj can you please help here ?

The struct template.ExtendedData does not have a field StartsAt. Check available fields here. You need to change the template to something like

{{ index .Alerts 0 }}
   {{ .StartsAt }}
{{end}}
1 Like

@yuriy.tseretyan
Thank you so much for your response.

In Grafana version 10.2.3

.StartsAt is working fine, but .EndsAt gives 0001-01-01 00:00:00 +0000 UTC when firing.
local_firing

In Grafana version 8.5.15

I added template in message box. But Template is printed as plain text and variables are not resolved.
web_firing