Attaching image to invoice via zapier

I’m trying to attach a file url from Airtable to an invoice via a custom webhook in Zapier. This is what I have so far, but I’m having a hard time figuring out what to pass through in the “data fields”

We have an Enterprise account, just need help attaching the documents to the invoice via API.


Uploading documents isn’t supported though Zapier

I understand that it is not a direct connect, but there is a way to do it through a post request right?

Yes, this is possible by sending a POST request with the API

Would you be able to show me the required parameters for doing this?

I have the url as follows:[ID]

headers as:
X-Ninja-Token: [TOKEN]

Problem is I don’t really know what to pass through besides that

I believe the document needs to be sent in a parameter named ‘file’

Would you be able to send an example?

Sorry, I don’t have one available

This did not work unfortunately

Can you post your full cURL request

I don’t see how the file is being sent? I suggest trying to get it working first using cURL and then attempt to transfer the settings to Zapier

sorry I uploaded the incorrect image to start

I think the content type should be “multipart/form-data”

Getting an error of “forbidden”

If you can provide me an example curl request, I think I can translate it to the zapier format.

Sorry, if I had one I’d share it

You aren’t able to provide me the parameters at all? I don’t need a live example I just need to know what data to pass through.

The only parameter unique to the documents request is called ‘file’

If you have a chance please try this format

curl -X POST<your_id> \
  -H 'Content-Type: multipart/form-data' \
  -H 'X-Ninja-Token: TOKEN' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -F _method=PUT \
  -F 'file=@filename.png'


curl -X POST<your_id> \
  -H 'Content-Type: multipart/form-data' \
  -H 'X-Ninja-Token: TOKEN' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -F 'file=@filename.png'