GMail attachment to Google Drive

Describe the issue/error/question

What is the error message (if any)?

Please share the workflow

(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

I am searching through GMail emails for particular subjects, which results in emails with PDF attachments. I need to take the PDF attachments and store them in particular Google Drive folders

I can read the PDF binary data fine from the GMail node. It renders into a correct PDF document.

I have the Google Drive node binary property set to {{$node[“Gmail”].binary.attachment_0}}

I am getting the error:
ERROR: No binary data property “filesystem:447_f30db31b-1ca5-400d-a2fa-b332b71ffc7a” does not exists on item!

Where am I screwing up?

Information on your n8n setup

  • Running n8n via

Hey @Mike_Z,
in your google drive node you are using an expression to set binary data for Binary Property. Can you instead just use the property name attachment_0?

1 Like

Thanks! Easier than I thought!

1 Like

How do I handle multiple attachments (attachment_0, attachment_1, etc.)? I don’t know ahead of time how many attachments there will be and I can’t seem to get the “Binary Property” field to accept an array of files.

I found this function and figured out how to get it working…

1 Like

Could you show an example of the workflow? Same problem with attachments and I cannot seem to work it out.