Skip to main content
Question

Trigger Box File Copy Webhook from Zoho CRM

  • May 23, 2025
  • 1 reply
  • 18 views

Forum|alt.badge.img

   When running this code:

CopyTestFolder = 174783516797;
    copypara = Map();
    copypara.put("Folder",{"id",CopyTestFolder});
        BoxFileID = 1017109913076;
        urlCopy = "https://api.box.com/2.0/file_requests/" + BoxFileID + "/copy";
        CopyResult = invokeurl
        [
            url :urlSearch
            type :POST
            parameters:copypara 
            headers:{"Authorization":"Bearer " + Token,"Content-Type":"application/json"}
        ];
    return CopyResult;

I receive this error:

Function executed successfully
  • {"type":"error","status":400,"code":"bad_request","context_info":{"errors":[{"reason":"invalid_parameter","name":"entity-body","message":"Invalid value 'Folder=%5B%22id%22%2C174783516797%5D'. Entity body should be a correctly nested resource attribute name/value pair"}]},"help_url":"http://developers.box.com/docs/#errors","message":"Bad Request","request_id":"74wyxch6lz178laf"}

Any ideas what I am doing wrong or any suggestions for things to try?

1 reply

Forum|alt.badge.img

Hello, 

I think this copypara.put("Folder",{"id",CopyTestFolder}); should be copypara.put("Folder",{BoxFileID,CopyTestFolder});

Where did you find that code example? 

Alex, Box Developer Advocate