Adding Attachment to Desk Ticket via Deluge

Adding Attachment to Desk Ticket via Deluge

Hello,

My team has a process where some people are entering information into a workbook in Zoho Sheet, and we need to get a copy of workbook into a ticket in Desk.  We currently have a 'Submit' button on the Sheet that triggers a webhook to Flow, and from there we find the appropriate Desk Ticket and run a function to download a copy of the file (Sheet file as xlsx) and attach it to the Ticket.  

I'm able to get the file from Sheet just fine, but whenever I try to attach it I get an error saying Bad Request.  Here is a portion of the code where I grab the file and try to attach it..
  1. if(targetSheetId != null)
  2. {
  3. downloadParams = Map();
  4. downloadParams.put("method","workbook.download");
  5. downloadParams.put("format","xlsx");
  6. downloadSheet = invokeurl
  7. [
  8. url :"https://sheet.zoho.com/api/v2/download/" + targetSheetId
  9. type :GET
  10. parameters:downloadParams
  11. connection:"sheetconnection"
  12. ];
  13. info "Download? " + downloadSheet;
  14. info "is File? " + downloadSheet.isFile();
  15. //
  16. //
  17. ticketAttachment = Map();
  18. ticketAttachment.put("file",downloadSheet);
  19. attachFile = invokeurl
  20. [
  21. url :"https://desk.zoho.com/api/v1/tickets/" + ticketId + "/attachments"
  22. type :POST
  23. parameters:ticketAttachment
  24. connection:"deskconnection"
  25. ];
  26. info attachFile;
  27. }
The responses I get on my info statements are:
  1. [
    	"Download? Testing File.xlsx",
    	"is File? true",
    	{
    		"errorCode": "BAD_REQUEST",
    		"message": "Bad Request."
    	}
    ]
The Create Attachment api references to types of parameters needing to be passed and I imagine that is where I'm getting tripped up, but am not sure.  

Any help is appreciated!