# Watcher PDF/PNG auto-generated attached report broken when sending through email ( version 7.2)

**URL:** <https://discuss.elastic.co/t/watcher-pdf-png-auto-generated-attached-report-broken-when-sending-through-email-version-7-2/191510>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [July 21, 2019, 10:21am UTC](https://discuss.elastic.co/t/watcher-pdf-png-auto-generated-attached-report-broken-when-sending-through-email-version-7-2/191510 "2019-07-21T10:21:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tazzking](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@tazzking](https://discuss.elastic.co/u/tazzking)\
**Post date:** [July 21, 2019, 10:21am UTC](https://discuss.elastic.co/t/watcher-pdf-png-auto-generated-attached-report-broken-when-sending-through-email-version-7-2/191510/1 "2019-07-21T10:21:43Z")

</div>

Hello Everyone,

I have configured the watcher to send email with dashboard preview attachment as PDF or PNG, it generate the report (can be found in Kibana report) and send the email. But somehow the email attachment get broken with error "Failed to load pdf document". Not sure if there is any formatting issue in here. Can somebody help....

PUT \_watcher/watch/demo\_report\_8  
{  
"trigger" : {  
"schedule": {  
"interval": "1h"  
}  
},  
"actions" : {  
"email\_admin" : {  
"email" : {  
"to": "abc@abc.com",  
"cc": "xyz@abc.com",  
"subject": "Monitoring Report",  
"body" : "{{ctx.payload.hits.total}} Metricbeat Report",  
"attachments" : {  
"Metricbeat.png" : {  
"http" : {  
"content\_type" : "image/png",  
"request" : {  
"method": "POST",  
"headers": {  
"kbn-xsrf": "reporting"  
},  
"read\_timeout": "300s",  
"auth":{  
"basic":{  
"username":"elastic",  
"password":"\*\*\*\*\*\*"  
}  
},  
"url": "[http://0.0.0.0:5601/api/reporting/generate/dashboard/Metricbeat-system-overview-ecs?\_g=(time:(from:now-1d%2Fd,mode:quick,to:now-1d%2Fd)](http://0.0.0.0:5601/api/reporting/generate/dashboard/Metricbeat-system-overview-ecs?_g=(time:(from:now-1d%2Fd,mode:quick,to:now-1d%2Fd)))&sync"  
}  
}  
}  
}  
}  
}  
}  
}

---

<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:** [August 1, 2019, 12:04pm UTC](https://discuss.elastic.co/t/watcher-pdf-png-auto-generated-attached-report-broken-when-sending-through-email-version-7-2/191510/2 "2019-08-01T12:04:42Z")

</div>

what elasticsearch version is this?

---

<div class="post-metadata">

**Author:** ![tazzking](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@tazzking](https://discuss.elastic.co/u/tazzking)\
**Post date:** [August 1, 2019, 2:57pm UTC](https://discuss.elastic.co/t/watcher-pdf-png-auto-generated-attached-report-broken-when-sending-through-email-version-7-2/191510/3 "2019-08-01T14:57:19Z")

</div>

Elasticsearch version 7.2....it able to send email with attachment (pdf or Png) and created a report in "report library" , but attachment in email "cannot be opened"

---

<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:** [August 1, 2019, 7:28pm UTC](https://discuss.elastic.co/t/watcher-pdf-png-auto-generated-attached-report-broken-when-sending-through-email-version-7-2/191510/4 "2019-08-01T19:28:48Z")

</div>

You don't need to use the `sync` parameter in there - just make sure you copy the link that kibana offers you...

where did you copy that link from that includes the `sync` parameter?

--Alex

---

<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:** [August 29, 2019, 7:34pm UTC](https://discuss.elastic.co/t/watcher-pdf-png-auto-generated-attached-report-broken-when-sending-through-email-version-7-2/191510/5 "2019-08-29T19:34:38Z")

</div>

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