How to access binary data from previous node

Describe the problem/error/question

I want to access binary data a few nodes after the web hook that receives it.
If the node is right after the webhook node, I can use {{$binary.screenshot}}, where screenshot is the name of the binary data and it works. However, if I am on the node that is a few nodes behind the web hook node, I cannot figure it out how to access the binary data.

Information on your n8n setup

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

hi @Angel_Todorov

You can try:

{{ $('Convert to File').item.binary.screenshot }}

Assuming said previous node is called “Convert to File”. Adjust to the name of the node if needed.

Hope this helps!

Same issue, but for me with binary.data, composing attachments for GMail node:
This is the error

Problem in node ‘Send eMail‘
property.split is not a function or its return value is not iterable (item 0)

And this the expressions (also tested with only one attachment):

"property": "={{ $('to DOCX').item.binary.data }}"
"property": "={{ $('to DOCX1').item.binary.data }}"

mind sharing the workflow? did my previous suggestion help?

No, it didn’t work, I opened a thread now here.