Send PDF from email to Google Drive with several steps

Describe the problem/error/question

Hi there, I already read Send PDF from Email to Google drive but it didn’t seem to help me with my usecase.

What is the error message (if any)?

ERROR: No binary data exists on item!

Please share your workflow

The problem is that it works when I have the GMAIL TRIGGER as the first step and GOOGLE DRIVE upload on second step.
In that case the “input Data Field Name” is attachment_6.

But when GOOGLE DRIVE upload is several step after the GMAIL TRIGGER, I have to call attachment_6 from a former step. I tried {{ $(‘Gmail Trigger’).item.binary.attachment_6 }} which display 1 result but the error is the : ERROR: No binary data exists on item!
I tried several other things without success. :slight_smile: might need some help !

Share the output returned by the last node

Information on your n8n setup

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

Hi @saachi
welcome back to the n8n community!

The parameter “Input Data Field Name” is expecting the name of the input binary field that contains the attachment, so the binary file must be there in the previous node.

A way to do that is by using a Merge node to add the binary files coming from the initial Gmail node into the input of the latest Google Drive node. In this way the binary files will be available. See demo workflow:

I hope this helps :wink:

3 Likes

Thanks @giulioandreini it works flawlessly !

Keep up the excellent support… and n8n, I love it :slight_smile:

1 Like

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