Upload Drive not working when Active mode is enabled

:question:Upload to Google Drive not working in Active mode

Hi everyone,

I’m having an issue with my n8n workflow that uploads email attachments (PDF and images) to Google Drive.

When I run the workflow in Test mode, everything works perfectly — all files are uploaded as expected.

However, when I enable Active mode, the workflow fails at the Upload File node with this error:

It seems like the binary data is no longer available when the execution reaches the Upload step.

:mag_right: Here’s what I’ve confirmed so far:

  • The Email Trigger (IMAP) receives emails with attachments.
  • Attachments are correctly processed and visible in Binary tab during test runs.
  • I’m merging data with metadata before uploading, using a Merge node (Mode: Merge by Index).
  • The Upload File node is configured with:
    • Input Data Field Name: data
    • File Name: {{ $json.fileName }}
    • Parent Folder: By ID from previous node

:rotating_light: Question:
How can I preserve binary data across workflow steps when running in Active mode, so the Upload File node still works?

Any help would be appreciated! :pray:

Information on your n8n setup

  • **n8n version: 1.86.1
  • **Database : Excel
  • **n8n EXECUTIONS_PROCESS setting : own
  • **Running n8n via : n8n cloud
  • **Operating system: Windown 10 Pro 64-bit

Hi @Anh_Toan_Le_Tr_n Welcome to n8n :n8n: community :tada:

I think you need to link the trigger to the two Code nodes above as well, otherwise they won’t be triggered by anything…

My workflow has been tested very stable (as shown in the picture I sent) but when in Active mode, the UploadFile node shows an error File not Found. Can you advise me?

It looks like in active mode your upload file fails because the binary data is lost when it comes into merge. But you said this works in test mode which means that binary data is stored in memory in test mode but is not preserved across Merge nodes in active mode. It would only preserve it if you give the binary data as your first input. so your GOM file email needs to be in Input 1 of Merge.

Binary data is not preserved across Merge nodes in Active mode unless it’s in the first input.

I think the merge node before the upload file is receiving an array of binary files, not just one file, because the code node before it is reproducing the binary file.

Can you try replacing the code node with a simple split-out, so it only passes the binary file?

like this:

Thanks for sharing,
but my Code node (GOM FILE EMAIL) is to convert from binary attachment_0, attachment_1 … attachment_n to binary.“data” to UPLOAD FILE DRIVE.

And When i test workflow, WF worked very well. But i turn on Active Mode, Node UPLOADFILE fail.

You likely need $input.all() instead of items, which is not defined in your GOM FILE EMAIL node.

But I wonder how would it work in test mode without this being fixed?

Upd: I was wrong. items is an old way of referring node input, now accessible by $input.all(). Still works, however it is marked as a mistake for a reason. It is recommended to change it for a proper input reference.

1 Like