I am trying to send a file from the n8n form to an HTTP request, but I can’t seem to get it to work.
What am I doing wrong here?
I am trying to send a file from the n8n form to an HTTP request, but I can’t seem to get it to work.
What am I doing wrong here?
I suppose the HTTP Request node executes before receiving the {{ $json.id }} you mentioned inside the URL parameter. Add a merge node which gathers input of different paths into a single one.
Why is this request node attached to the first node anyways I can’t seem to understand that part? You are not using expressions that point at the first node.
It kept saying that the node before the HTTP request node needed to contain the binary file.
I’m still struggling to get this to work.
The id from creating a task is fine, the issue is more so that I keep getting an error about the binary file…
this operation expects the node’s input data to contain a binary file ‘data’, but none was found [item 0]
The reason behind that error is that the endpoint you are sending a request to requires a binary file.
I’m not sure if the last node outputs a binary file in your workflow. But if it does so under the title ‘attachment’ then you have to change the body of the request as shown in the image below:
Important: The last node must output a binary file named ‘data’ (default is data) in your case. Also if the request body shown in the image above did not work too then check the documentation of the target service you are posting a request to. They must have a detailed guide on parameter setup.
I faced the same issue when building automation in n8n. After a lot of trial and error, I discovered a clean solution.
check my blog for more details,and customize nodes as per your requirements