i have a set node->http node for token generation → http node where i need to send the multipart/form-data file + the token generated in the http token generation node.
When i make this sequence it does not read the multipart/form-data from the set node as it needs to be directly connected but i need the token as well to consolidate everything in the service http node.
What is the error message (if any)?
the error is: This operation expects the node’s input data to contain a binary file ‘file’, but none was found [item 0]
but as soon as remove the http generation token and add a genenrated token fixed into the service node it works because it has direct connection to the SET node.
All i need is to find a way to make i the http service node receive the multipart file without removing the token http node in the middle or a workaround.
Any idea?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
You’re on the right track — the issue is caused by how n8n passes binary data. Binary files must be passed directly to the node that needs them, which is why it fails when you insert another HTTP node (for token generation) in between.
Here’s a workaround that works:
Solution: Use a Merge node
Set Node: Add the file and any other necessary form-data fields.
HTTP Token Node: Send a request to generate the token.
Merge Node:
Set mode to Pass-through.
Connect both the Set Node (binary data) and the Token Node (headers/credentials) into it.
Set it to pass through the input from the Set node (input 1).
Service HTTP Node:
Add your multipart/form-data config.
Use expressions like {{$node["HTTP Token Node"].json["access_token"]}} to inject the token.
The binary file will be passed from the Set Node via the Merge node.
This way, the file reaches the HTTP node, and you still have access to the token in the same execution.
You can even use a Function node after the Merge node to combine all values into the right format before sending.
Let me know if you’d like a quick example JSON to import directly!
Thank you both for the support, unfortunately my version does not have Pass-through option only: append, combine, sql query and choose branch. With the option append i managed to get both “file and token” . However, for some reason when i use expression to get the access_token from the merge node to the service http node it says “Undefined” like no value is coming(even though i can see the token generated)