Fetch a Record, Rename and Upload to WorkDrive

Fetch a Record, Rename and Upload to WorkDrive

Hi all,

We have thousands of test records and we can click the 'download button' on the report on a single record and it will rename and download, as below. It works great, nice and easy.
  1. //groupReportNo = frmGroup[ID = input.groupID].groupReportNo;
  2. //groupReportID = frmGroup[ID = input.groupID].groupID;
  3. //openUrl("https://app.zohocreator.eu/companyName/ABC/record-pdf/rptSamples/" + input.ID + "/Report-" + groupReportNo + "-Sample-" + input.sampleID //+ "-Group-" + groupReportID + "-" + input.sampleTestAge + "-Day","same window");
We now need to fetch that same record (a Record Template exists), rename it and upload it to a folder on WorkDrive.
  1. file_variable = invokeurl
  2. [
  3. url : "https://app.zohocreator.eu/theomegagroup/tog/record-pdf/rptSamples/" + input.ID
  4. type :GET
  5. ];
  6. response = zoho.workdrive.uploadFile(file_variable,"9pplr7c600c3c22ea44de81c241984ac5748f","report1.pdf",false,"connection_oauth_key");

For the more talented people out there I'm sure you can see the issue straight away. I have looked everywhere and searched but can't seem to find a solution.

Can anyone help or advise on this, please? I'm sorry if this has already been discussed.

Many thanks

Nick