# How to get Loki log timestamps into an AlertManager email using Grafana

**URL:** <https://community.grafana.com/t/how-to-get-loki-log-timestamps-into-an-alertmanager-email-using-grafana/36414>\
**Category:** Grafana Loki\
**Tags:** loki\
**Created:** [September 10, 2020, 2:20pm UTC](https://community.grafana.com/t/how-to-get-loki-log-timestamps-into-an-alertmanager-email-using-grafana/36414 "2020-09-10T14:20:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![frankb](https://avatars.discourse-cdn.com/v4/letter/f/278dde/32.png) [@frankb](https://community.grafana.com/u/frankb)\
**Post date:** [September 10, 2020, 2:20pm UTC](https://community.grafana.com/t/how-to-get-loki-log-timestamps-into-an-alertmanager-email-using-grafana/36414/1 "2020-09-10T14:20:29Z")

</div>

Hi There,  
I have set up Promtail and Loki with Grafana.  
I get the logs no problem, I see the “ts” and “tsNs” parsed fields. I use AlertManager as a notification channel.  
Is there any way to get any of these two fields into the AM email template, e.g. by somehow converting it into a label?

I have tried with promtail, but sometimes the log line does not actually include the “ts=” part. However, even in this case Grafana seems to be able to parse the timestamp.

Many thanks
