Re-using binary data

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:

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

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

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!

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