mokkin
July 3, 2024, 11:56am
1
I’m retrieving a binary file (PDF) via HTTP node to be processed in the following node. That’s fine.
Some nodes later I need the same file again to be processed (Email node) again. How can I select the same binary file without retrieving it again?
Information on your n8n setup
n8n version: 1.45.1
Database (default: SQLite): SQLite
n8n EXECUTIONS_PROCESS setting (default: own, main): default
Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
Operating system: Ubuntu 22.04
Hi @mokkin , thanks for reaching out again. Happy to have you as part of our community.
Your best option would be to ensure that the binary is included in the outputs of the subsequent nodes as long as you need it.
Here are some other resources from out community that might be helpful:
I am trying to access the binary data of a node in a loop over items. I do require the loop over items (my actual workflow is more complicated), I have just provided below as a MWE.
What is the error message (if any)?
No error, but binary data is not outputted. See output of last node below.
Please share your workflow
Share the output returned by the last node
[image]
As above, not as the not as the n8n binary data output
Information on your n8n setup
n8n version: …
Welcome to the community @Ronald_Lam !
Sorry not at the computer right now, so can not post an example. But what you can do is to merge the binary data back in the flow again by using the Merge-Node in mode “Merge by Index”.
Hope that is helpful!
mokkin
July 3, 2024, 10:39pm
3
Thank you for your answer @Ludwig !
Unfortunately something like {{ $('get PDF').item.binary.data }}
doesn’t seem to work as described here .
Therefore I did it with the merge node as suggested like this:
Is this also your recommendation?
2 Likes
jan
July 3, 2024, 11:11pm
4
Yes, there is currently no other way of doing that (Merge-Node).
However, we are rethinking binary data. We have wanted to change it for a while as it constantly causes confusion, and we would rather make it work like all other data in n8n. If it gets implemented as planned, something like the expression mentioned above would work.
1 Like
mokkin
July 3, 2024, 11:15pm
5
That would be great. Especially when reusing the binary file multiple times using several merge nodes can become confusing.
I’m looking forward for the feature!
system
Closed
July 10, 2024, 11:15pm
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.