Get multiple attachments from Gmail and upload them to GDrive
Needs changesWhat 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
Other Gmail + Google Drive templates (465)
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).
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
Published 2024 — 25% of templates published before 2025 need changes for 3.0. See how template age affects 3.0 readiness →
| 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…