# Is there way to automatically call my application service from Elasticsearch when new document inserted in index?

**URL:** <https://discuss.elastic.co/t/is-there-way-to-automatically-call-my-application-service-from-elasticsearch-when-new-document-inserted-in-index/182439>\
**Category:** Elasticsearch\
**Created:** [May 23, 2019, 12:38pm UTC](https://discuss.elastic.co/t/is-there-way-to-automatically-call-my-application-service-from-elasticsearch-when-new-document-inserted-in-index/182439 "2019-05-23T12:38:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitin.jangid](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@nitin.jangid](https://discuss.elastic.co/u/nitin.jangid)\
**Post date:** [May 23, 2019, 12:38pm UTC](https://discuss.elastic.co/t/is-there-way-to-automatically-call-my-application-service-from-elasticsearch-when-new-document-inserted-in-index/182439/1 "2019-05-23T12:38:07Z")

</div>

My use-case is that whenever new document inserted in elasticsearch index, elasticsearch should automatically inform/hit my application service that new document inserted.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 23, 2019, 1:47pm UTC](https://discuss.elastic.co/t/is-there-way-to-automatically-call-my-application-service-from-elasticsearch-when-new-document-inserted-in-index/182439/2 "2019-05-23T13:47:09Z")

</div>

Not really something like this...

You could try with alerting (under commercial license or trial) and run every x seconds a query which gets last documents from the last x seconds and then as an action call a webhook with that list of documents...

Not sure if it's a good idea though.

---

<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:** [June 20, 2019, 1:47pm UTC](https://discuss.elastic.co/t/is-there-way-to-automatically-call-my-application-service-from-elasticsearch-when-new-document-inserted-in-index/182439/3 "2019-06-20T13:47:16Z")

</div>

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