Templates / Save Gmail Attachments to Google Drive Automatically

Save Gmail Attachments to Google Drive Automatically

Beginner   Apps: Gmail, Google Drive  ·  Setup: 10 minutes

Invoices, contracts, and reports arrive as email attachments and then rot in your inbox. Saving them manually to Drive is a chore everyone forgets. This workflow watches your inbox and files every attachment into a Drive folder automatically, so your document trail builds itself.

Download workflow JSON (free) Setup guide

What this workflow does

  1. A Gmail Trigger polls your inbox every minute for new emails that have attachments.
  2. The trigger downloads each attachment as binary data.
  3. A Google Drive node uploads every attachment into the folder you choose, keeping the original filename.

Setup guide

  1. Import the JSON into n8n (Workflows > Import from File).
  2. Connect your Gmail account in the Gmail Trigger node (OAuth, two clicks).
  3. In the trigger's filters, keep 'has:attachment' - or narrow it, e.g. 'from:billing@supplier.com has:attachment'.
  4. Connect Google Drive in the upload node and pick your destination folder.
  5. Activate the workflow. Send yourself a test email with an attachment to confirm.

Want this running 24/7?

Self-host n8n on a cheap VPS and this workflow runs around the clock for less than a coffee a month.

Get an n8n VPS from $5/month

FAQ

Can I sort attachments into different folders by sender?Yes. Add a Switch node after the trigger that routes on the sender address, and connect one Google Drive node per folder.
Does it handle multiple attachments in one email?Yes. Each attachment comes through as its own binary property and the Drive node uploads all of them.
Can it rename files with the date or sender?In the Google Drive node, set the file name to an expression like {{ $now.toFormat('yyyy-MM-dd') }} - {{ $json.from.value[0].address }} - {{ $binary.attachment_0.fileName }}.

Want the workflows this one is a warm-up for?

The Mega Bundle packs both WorkflowForge Pro volumes — 32 production-grade workflows: automations (cart recovery, lead scoring, invoice extraction) and AI agents (support agent, calendar assistant, research agent), each with a setup guide. $39 for both, instant download.

Get the Mega Bundle →

Need it customized for your exact process?

I build custom n8n automations and AI agents professionally: your tools, your edge cases, tested and documented.

Hire me on Fiverr →