Error attaching documents via webhook in zapier

Hi there,

I’m having some trouble attaching documents to invoices through zapier.

I have the following POST request setup but continue to get the error “Symfony\Component\Debug\Exception\FatalThrowableError”

I do believe I have the request formatted correctly but was wondering if I can get someone to take a look and steer me in the right direction?

I’ve also tried the following python code and can’t get it to work

import requests

file = ‘

headers = {}
headers[‘X-Ninja-Token’]= ‘axby0uqadrprstomsjvao4eocdbj9as9’
headers[‘Content-Type’]= ‘multipart/form-data’
headers[‘X-Requested-With’]= ‘XMLHttpRequest’

url = ‘

r =, headers=headers,files={‘file’: file})

I assume you’re using the v4 app?

Here’s an example, you need to set the invoice_id, token and filename

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'

In the example I do set the invoice id = 929

The file is from a url, so could that be causing the issue? How would you do it in a curl request if the file is from a url?

I’m not sure if that’s possible, you may need to download the file first.

I’ve been achieve this via zapier until very recently. The image is the example of how I’m doing it.

Are you saying this was working and then stopped working? In your initial post you implied you were tying to set this up.

It was working formerly yes

But now I’m getting an error “Symfony\Component\Debug\Exception\FatalThrowableError”.

Can you please check when was the last time it worked correctly?