Get multiple attachments from Gmail and upload them to GDrive
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: Function (legacy). 1 breaking item(s) found. Static check, last run 2026-10-19.
What this workflow does
This workflow has 3 nodes and runs on Gmail events. Along the way it connects Gmail and Google Drive.
How it runs
Trigger: On Gmail events.
- attach binary data outputs (Function): runs custom JavaScript (legacy Function node)
- upload files to google drive (Google Drive): uses Google Drive
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- Function (legacy) in attach binary data outputs: replace with Code node, mode 'Run Once for All Items'.
- Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
| Removed in 3.0 | Replace with |
|---|---|
| Function (legacy) attach binary data outputs | Code node, mode 'Run Once for All Items' |
Nodes used (3)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Function
n8n-nodes-base.function - Google Drive
n8n-nodes-base.googleDrive
From the author
This is a simple template to show how to extract multiple email attachments and return them as an iterable output. How it works: The Gmail Trigger node detects any new email that has attachments. The Code node will then extract them as binary files and…