# Watcher : How to read values for "To :" field in Watcher feature from Database

**URL:** <https://discuss.elastic.co/t/watcher-how-to-read-values-for-to-field-in-watcher-feature-from-database/244908>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [August 13, 2020, 3:39pm UTC](https://discuss.elastic.co/t/watcher-how-to-read-values-for-to-field-in-watcher-feature-from-database/244908 "2020-08-13T15:39:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RaTheDev](https://avatars.discourse-cdn.com/v4/letter/r/c5a1d2/32.png) [@RaTheDev](https://discuss.elastic.co/u/RaTheDev)\
**Post date:** [August 13, 2020, 3:39pm UTC](https://discuss.elastic.co/t/watcher-how-to-read-values-for-to-field-in-watcher-feature-from-database/244908/1 "2020-08-13T15:39:30Z")

</div>

We have configured Watchers and send emails using Email feature to different distribution lists.  
And here comes the issue with distribution lists, since the distro's needs to be controlled by one or team we are not sure to whom the watcher emails are sent. So our client wants to control the distro's from Database or file, where Kibana watcher would query the Database to find the emails from Distribution list.  
Attaching screenshot for more reference

 ![Screen Shot 2020-05-21 at 8.43.59 AM](https://us1.discourse-cdn.com/elastic/original/3X/d/2/d277a17c8faa33eaa5849fb0b29b0397955ecb02.png)

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [August 13, 2020, 7:02pm UTC](https://discuss.elastic.co/t/watcher-how-to-read-values-for-to-field-in-watcher-feature-from-database/244908/2 "2020-08-13T19:02:20Z")

</div>

This is more of an Elasticsearch question, there is just a UI for it in Kibana. I am happy to move this to the correct channel if needed.

There are more details about this in the docs to help you get started: [https://www.elastic.co/guide/en/elasticsearch/reference/current/actions-email.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/actions-email.html). But in short you will need to setup the email account in the `elasticsearch.yml` file.

---

<div class="post-metadata">

**Author:** ![RaTheDev](https://avatars.discourse-cdn.com/v4/letter/r/c5a1d2/32.png) [@RaTheDev](https://discuss.elastic.co/u/RaTheDev)\
**Post date:** [August 17, 2020, 4:14pm UTC](https://discuss.elastic.co/t/watcher-how-to-read-values-for-to-field-in-watcher-feature-from-database/244908/3 "2020-08-17T16:14:20Z")

</div>

Hello Tyler,

Thank you for the response. But I am already able to send emails from Watcher, as a comma separated distro's and emails and it is working as it supposed to.  
But my client want to take the control of "TO" field by adding the distribution list and emails, which they wanted to read that values of Database table or a file.

So please let me know if it is possible.

---

<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:** [September 14, 2020, 4:14pm UTC](https://discuss.elastic.co/t/watcher-how-to-read-values-for-to-field-in-watcher-feature-from-database/244908/4 "2020-09-14T16:14:21Z")

</div>

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