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

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))&sync"
}
}
}
}
}
}
}
}

what elasticsearch version is this?

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"

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