Copy Creator file field to CRM file field.

Copy Creator file field to CRM file field.

Hello,

I am trying to transfer the content of a Zoho Creator record afer form submission to a new CRM deal record with a deluge form worklfow.

I am trying to see of I can transfer the files fields. 

  1. creationMap = Map();
  2. if(Revendeur == "IEL Technologie agricole" || Revendeur == "Les Equipements Avipor Ltee")
  3. {
  4. creationMap.put("Account_Name",input.Revendeur);
  5. }
  6. creationMap.put("Deal_Name",input.Nom_de_l_affaire);
  7. creationMap.put("Closing_Date",input.Date_realisation);
  8. creationMap.put("Pipeline",input.Pipeline);
  9. creationMap.put("Expected_Delivery_Date",input.Date_realisation);
  10. creationMap.put("Stage",input.etape);
  11. creationResponse = zoho.crm.createRecord("Deals",creationMap);
  12. info creationResponse;
  13. if(Factures != null)
  14. {
  15. creationRespondeid = creationResponse.getJSON("id");
  16. attachFactures = zoho.crm.attachFile("Deals",creationRespondeid,input.Factures.tofile(input.Factures));
  17. info attachFactures;
  18. }
I try this but this not work, I have an error on the filetype that is string, but I need a file. 

So I tried to find a way to download the file in my script with this invoke URL API https://www.zoho.com/creator/help/api/v2.1/download-file.html

But I cannot create or use a connection for Zoho Creator in Zoho Creator...

Did you have an idea to perform it ?

Thanks for your help !