Sending binary files in API requests

Describe the problem/error/question

I have one HTTP node that logs me in to a platform and returns the bearer token, and I have a separate workflow that generates a file. I need to feed the bearer token and the file to a second HTTP node and send the file through in an API requests, and use the token to authenticate.
The authentication works fine, but I can’t figure out how to send the file.

I’ve tried many things. Currently the only way I can see the binary file as an input in the second HTTP node is to merge the output of the preceding two nodes.

However, I still can’t figure out how to send the file in the API request.

What is the error message (if any)?

This operation expects the node’s input data to contain a binary file ‘data’, but none was found [item 0]

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.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Alex_Argyros hope all is good. Welcome to the community.

I anticipate two possible issues:

  • you are merging using append mode
  • you misconfigure the HTTP Request node.
    • using wrong file field
    • using wrong binary property name

If you attach your workflow, I can take a look. Generally, it would looks something like this:

Biggest suspect is you are using the append mode for merge node. Try combine (all combinarions).

Thanks @jabbson , you are right, the merge node was the problem. Append wasn’t working, but combine/all possible combinations worked.
Thanks again.