Basic question regarding passing data through workflow

Describe the problem/error/question

I’ve been playing around with n8n for a few weeks now, and somehow I keep running into the same problem. Unfortunately, I haven’t been able to find a basic explanation for it.

Regardless of whether it’s a trigger input or during the workflow, at some point I receive a binary file.

I can only access this file in the next node. If I want to access it two nodes later, for example, I simply can’t find a solution for it.

What is the error message (if any)?

It’s always a different error message. The question is meant to be more fundamental. In this workflow, for example, I get this.getNodeParameter(…).split is not a function.

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

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

Hey @ddl87 hope all is good.

In order to reference the binary, you have options:

  • save the file and load it back right before you needs it
  • merge the node outputting a binary with the node just before the one that consumes it.
  • convert the image to a base64 string and work with that, if the node consuming it accepts that

what it could look like

Here I used the output of the 2 branch to pass through the merge node, but if you need both, you would use the Combine mode with all possible combinations.

Hey @jabbson

Thanks for your help! So basically, i’m not doing anything wrong… There is just really no way to reference to a data object directly if it’s not the exact previous node?

I already tried the second option. But then the merce outputs 2 items and everything else after also runs 2 time. Even if i set the Merce to only run once.

This runs 2 times because of the mode, change to combine with all possible combinations. That is if you need both the output of the upload node as well as the openai node later in the workflow. Otherwise just choose the branch to pass data from to later nodes.

Ok thanks! Do you have an example, how to store the binary file?

This is only possible in the self-hosted setup, so probably wouldn’t apply to you.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.