Transferring CRM Attachments to Workdrive
- relatedrecords = zoho.crm.getRelatedRecords("Attachments","Conditions",conId);
- attachid = List();
- for each ele in relatedrecords
- {
- attachementId = ele.get("id");
- attachid.add(attachementId);
- }
- for each ele in attachid
- {
- counter = 1;
- downloadFile = invokeurl
- [
- url: "https://www.zohoapis.com/crm/v2/Conditions/" + conId + "/Attachments/" + ele
- type: GET
- connection : "work_drive"
- ];
- resp2 = zoho.crm.attachFile("Deals",dealId,downloadFile);
- resp3 = zoho.workdrive.uploadFile(downloadFile, dealWD, "PlaceHolder"+counter+"", false, "xxxxxxxxxxx");
- counter = counter+1;
- info resp2;
- info resp3;
- }
This is my code. I get this error:
- An internal error occurred on executing the integration task 'zoho.workdrive.uploadFile'. Line Number:20
Has anyone had success taking .pdf attachments from the attachments related list and uploading them to the work drive?