Attach file uploaded via Zoho forms into CRM

Attach file uploaded via Zoho forms into CRM

Hi everyone,

facing currently the problem that I like attach uploaded files from Zoho Forms into Zoho CRM.
My approach was to use Zoho Flow but when using the Zoho Forms trigger, I receive the files in this structure:


My idea was to download the file via deluge script using invoke. For this I guess I need to replace all "/" in the filepath parameter with "%2F". After downloading the file I can attach it everywhere in the CRM.

Code like this:
string addAttachmentToModuleEntry(string filePath, int entryID, string moduleType)
{
formsFilePath = filePath.subString(filePath.find("=") + 1,filePath.length());
formsFilePath = formsFilePath.replaceAll("/","%2F");
formatedFilePath = filePath.left(filePath.find("=") + 1) + formsFilePath;
info formatedFilePath;

//download file
getAttachment = invokeurl
[
url : formatedFilePath
type :GET
];
info getAttachment;

//attach file directly to module entry
attachToFile = zoho.crm.attachFile(moduleType,entryID,getAttachment);
info attachToFile;

return "";
}

But this initially link (filePath) isn't working at all. Also if I try to access the file manually.
Any hints how to solve this?