# Watcher send\_email and update\_documents Function Inquiry

**URL:** <https://discuss.elastic.co/t/watcher-send-email-and-update-documents-function-inquiry/198772>\
**Category:** Elasticsearch\
**Created:** [September 9, 2019, 7:13pm UTC](https://discuss.elastic.co/t/watcher-send-email-and-update-documents-function-inquiry/198772 "2019-09-09T19:13:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaw](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@Shaw](https://discuss.elastic.co/u/Shaw)\
**Post date:** [September 9, 2019, 7:13pm UTC](https://discuss.elastic.co/t/watcher-send-email-and-update-documents-function-inquiry/198772/1 "2019-09-09T19:13:42Z")

</div>

Hi,

I encountered an issue where "update\_documents" failed to execute and "send\_email" is still sending the result, which is causing multiple duplicate contents from emails. Is anywhere I can make a condition that if "update\_documents" failed, stop "send\_email" function?

---

<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:** [October 7, 2019, 7:23pm UTC](https://discuss.elastic.co/t/watcher-send-email-and-update-documents-function-inquiry/198772/2 "2019-10-07T19:23:30Z")

</div>

Closed on October 7, 2019, 7:23pm UTC

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