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