# Watcher custom email alert

**URL:** <https://discuss.elastic.co/t/watcher-custom-email-alert/251060>\
**Category:** Kibana\
**Created:** [October 6, 2020, 12:18am UTC](https://discuss.elastic.co/t/watcher-custom-email-alert/251060 "2020-10-06T00:18:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anjana1](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@anjana1](https://discuss.elastic.co/u/anjana1)\
**Post date:** [October 6, 2020, 12:18am UTC](https://discuss.elastic.co/t/watcher-custom-email-alert/251060/1 "2020-10-06T00:18:25Z")

</div>

I am trying to create an email alert using watcher. For advanced watcher options , do we have any sample templates to follow ? I would like to trigger emails when application date does not match with current date.

How can I get application date into watcher payload? can we only use the ctx.\* values in our scripts ? Whenevr I use my application parameters it return only null values ..like I used my apm label values to compare the values but they return null..

---

<div class="post-metadata">

**Author:** ![cheiligers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheiligers/32/73114_2.png) [@cheiligers](https://discuss.elastic.co/u/cheiligers)\
**Post date:** [October 6, 2020, 8:58pm UTC](https://discuss.elastic.co/t/watcher-custom-email-alert/251060/2 "2020-10-06T20:58:10Z")

</div>

@anjana1 there are some [templates](https://www.elastic.co/guide/en/elasticsearch/reference/current/how-watcher-works.html#templates) that you can follow. There are other [options](http://elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-using.html#modules-scripting-using) you should be able to use in your scripts, including `painless` scripts.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 3, 2020, 8:58pm UTC](https://discuss.elastic.co/t/watcher-custom-email-alert/251060/3 "2020-11-03T20:58:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
