Can't "Extract from File" if there are other nodes in between

Describe the problem/error/question

If my “Extract from File” node is immediately after the node containing the binary, the extraction works.
But if I put some other nodes in between the “Extract from File” node and the the binary (in my case some logic to determine the file type) - the “Extract from File” node doesn’t output anything.

I’m doing exactly what the Tooltip says to access the binary data in previous nodes and the object is successfully referenced in the editor.

What is the error message (if any)?

No error. The node executes successfully, and there’s no output.

Please share your workflow

Share the output returned by the last node

“No output data returned”

Information on your n8n setup

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

@pat1
If I’m not mistaken, you can’t process binary data like that. Binary data must be carried to be processed by the next node. In your case, you have to carry the binary data all the way to the switch node so it can be processed. You can’t call it with {{ $(‘Webhook’).item.binary.file }}.

As @Sandiyasa mentioned already, you need to carry the binary data all the way trough to your extract from file node. There are two options in your situation:

Return the binary data from your code node too, like it’s described here: Set Binary Data with Code node

Or put a Merge Node behind your code node and merge the Webhook output and code node output together to have one item including both outputs again.

1 Like

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