# Script in action section of watcher

**URL:** <https://discuss.elastic.co/t/script-in-action-section-of-watcher/99821>\
**Category:** Elasticsearch\
**Created:** [September 8, 2017, 9:05am UTC](https://discuss.elastic.co/t/script-in-action-section-of-watcher/99821 "2017-09-08T09:05:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gchakkalakkal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gchakkalakkal/32/52203_2.png) [@gchakkalakkal](https://discuss.elastic.co/u/gchakkalakkal)\
**Post date:** [September 8, 2017, 9:05am UTC](https://discuss.elastic.co/t/script-in-action-section-of-watcher/99821/1 "2017-09-08T09:05:19Z")

</div>

Can we execute painless script in action of watcher. If yes please provide some example/syntax as i would like iterate through payload in the execution context.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 8, 2017, 9:30am UTC](https://discuss.elastic.co/t/script-in-action-section-of-watcher/99821/2 "2017-09-08T09:30:32Z")

</div>



---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 8, 2017, 9:30am UTC](https://discuss.elastic.co/t/script-in-action-section-of-watcher/99821/3 "2017-09-08T09:30:34Z")

</div>

please refrain from writing several posts at once, because you have not gotten any help immediately - this is a forum without any SLAs. Thank you. I will close this thread.
