InvokeURL - Execution exception : 'Error due to - 'Internal Exception''
I want to be able to download an image/pdf from a url and attach it to a record in CRM. My code is as follows:
file_attach = invokeurl
[
url :imageurl
type :GET
];
info file_attach;
file_attach.setFileName(file_attach_name);
new_attachment =
zoho.crm.attachFile("People",personid, file_attach);
The variable
imageurl is in the right format and if pasted into a web browser, the image is shown.
The response I get is:
Failed to execute function
- Execution exception : 'Error due to - 'Internal Exception''
Any idea what I'm doing wrong?