I’m using Make/Integromat to automate creating multiple invoices by reading a list of invoice data from a CSV which works well.
However I also need to attach a file to the invoices. This is not possible using the built-in Invoice Ninja Make Modules that create invoice.
So instead I using the generic Make API Call to call the Update Invoice end point to attach the file. I just can’t get it to work. The API call is returning a 200 success, but no files are being added to the Documents of the invoice.
Here is the basic syntax I’m using.
I’m using the “Invoice ID” from the create invoice module which works fine, and I’m using the raw “Data” from the file download from Google Drive module for the file to upload to the Documents array of the invoice.
Is what I’m doing possible, using the raw data from Google file download as the file?
Is my syntax correct?
Any guidance much appreciated.
I get what you said, but I have not been successful trying to implement that within the Make interface.
I used documents array instead of files, because that’s what the Upload API states, but I did also try using file
Not sure if you have used Make before, maybe my syntax is wrong.
I tried putting it in the body but got 404 error.
Then I also tried separating it into the Query strings. That seemed to work better, but I got a different 422 error, it didn’t like my DATA as a file.
The operation failed with an error.  The given data was invalid. “file”: The file must be a file.; The file must be a file of type: csv, png, ai, jpeg, tiff, pdf, gif, psd, txt, doc, xls, ppt, xlsx, docx, pptx.