# Unable to retrieve fields in email

**URL:** <https://discuss.elastic.co/t/unable-to-retrieve-fields-in-email/114017>\
**Category:** Elasticsearch\
**Created:** [January 4, 2018, 6:09am UTC](https://discuss.elastic.co/t/unable-to-retrieve-fields-in-email/114017 "2018-01-04T06:09:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saradac](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@saradac](https://discuss.elastic.co/u/saradac)\
**Post date:** [January 4, 2018, 6:09am UTC](https://discuss.elastic.co/t/unable-to-retrieve-fields-in-email/114017/1 "2018-01-04T06:09:14Z")

</div>

Hi All,

I have set email configuration and I am able to receive the static email. When I changed body to dynamic I can't retrieve e.x. hostname.

I can see the fields in Kibana Search. I am able to get only the fields available in ctx. Below is my ctx:

> {  
> "ctx" : {  
> "metadata" : {  
> "name" : "fuse file managment "  
> },  
> "watch\_id" : "fuse-file-management",  
> "payload" : {  
> "\_shards" : {  
> "total" : 378,  
> "failed" : 0,  
> "successful" : 378,  
> "skipped" : 0  
> },  
> "hits" : {  
> "hits" : ,  
> "total" : 414648,  
> "max\_score" : 0.0  
> },  
> "took" : 155,  
> "timed\_out" : false  
> },  
> "id" : "fuse-file-management\_ae826335-a488-45cc-912f-68fc6cc69885-2018-01-04T05:55:34.640Z",  
> "trigger" : {  
> "triggered\_time" : "2018-01-04T05:55:34.640Z",  
> "scheduled\_time" : "2018-01-04T05:55:34.427Z"  
> },  
> "vars" : { },  
> "execution\_time" : "2018-01-04T05:55:34.640Z"  
> }  
> }

---

<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:** [January 4, 2018, 9:18am UTC](https://discuss.elastic.co/t/unable-to-retrieve-fields-in-email/114017/2 "2018-01-04T09:18:53Z")

</div>

please share your watch, the output of the execute watch api (or a watch history entry) for proper debugging. Thanks!

--Alex

---

<div class="post-metadata">

**Author:** ![saradac](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@saradac](https://discuss.elastic.co/u/saradac)\
**Post date:** [January 4, 2018, 10:35pm UTC](https://discuss.elastic.co/t/unable-to-retrieve-fields-in-email/114017/3 "2018-01-04T22:35:05Z")

</div>

oops my bad, I set body size to 0 so nothing is displayed.

---

<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:** [February 1, 2018, 10:35pm UTC](https://discuss.elastic.co/t/unable-to-retrieve-fields-in-email/114017/4 "2018-02-01T22:35:42Z")

</div>

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