How to Save Gmail Attachments to Google Drive (Manually and Automatically)


Abstract flat illustration of a white envelope with a paper document slipping out and a teal arrow curving into two stacked folders, navy and teal, on a light background

Advertisement

Last Tuesday a client emailed me a signed contract as a PDF. On Thursday I needed it again, so I typed “contract” into Gmail and got forty threads back, none obviously the one with the file attached. The PDF itself was sitting in my Downloads folder as scan_0042 (1).pdf. The email was searchable; the attachment was not. That gap is exactly what saving Gmail attachments to Google Drive fixes — and Gmail only ships half of the solution. The manual save takes ten seconds. The automatic half you have to build yourself. Here are both, in the order I’d set them up again.

The Manual Way: “Add to Drive” (Ten Seconds, Every Time)

For a one-off file, Gmail has this built in and it works fine.

  1. Open the message in Gmail on your computer. Attachments sit at the bottom of the message body.
  2. Hover over the attachment. Two icons appear: a download arrow and the Drive triangle. Click Add to Drive.
  3. If the message carries several attachments, hover at the right end of the attachment row and click Add all to Drive to send them in one go.
  4. Pick a destination folder in the dialog, or accept the default — the root of My Drive — and confirm.

The file is copied, not moved: the email keeps its own copy afterward. Changed your mind about the destination? Hover the attachment again and click Organize in Drive to repoint it without re-uploading.

What Gmail won’t let you save

Two situations where the Drive icon never shows up or fails: the sender turned on confidential mode (which blocks downloading and copying entirely, Drive included), or the file type isn’t one Drive stores. If the icon is missing on a message you expected to save, check for the confidential-mode lock next to the sender name first — no setting on your side overrides it.

Note: Files saved this way keep the name they arrived with — invoice.pdf, scan_0042.pdf — and land wherever you pointed them, defaulting to My Drive's root. Save more than a couple a week and the renaming and filing becomes the real chore. That's the problem the rest of this guide solves.

Why There Is No Native Auto-Save Setting

People hunt through Gmail’s settings for this rule. It isn’t there. Gmail filters can label, archive, star, forward, and delete messages — but no filter action touches attachments, so a filter cannot save a file to Drive. The one native exception is Workspace Studio on paid Google Workspace business plans, where a flow starting with “When I get an email” can drop attachments into a Drive folder you choose.

On free and consumer accounts, the automatic half is always a tool connected to your mailbox: a Gmail add-on, a no-code automation like Zapier or Make, or a Google Apps Script.

RouteSetup timeOngoing costWhere files landBest for
Add to Drive buttonNoneFreeWherever you pick, each timeOne-off files
Gmail add-on (cloudHQ, Save Emails)~10 minFree tiers capped (cloudHQ’s free plan covers roughly 50 emails/month), then paidFixed folder per ruleLabel-based routing without code
Workspace Studio~10 minIncluded in Workspace business plansFolder per flowTeams already on paid Workspace
Zapier / Make~20 minFree tiers (100 tasks / 1,000 credits), then paidFixed folder per ruleRouting attachments into a wider stack
Apps Script~30 min if you can paste codeFreeFolder named in the codeVolume without per-task fees

The Setup I Actually Run: Filter First, Automate Second

The mistake most attachment automations make is trying to catch “all mail with attachments” in one rule. The sturdier pattern splits the job: a Gmail filter applies a label (native, free, reliable), and the automation watches that label and saves whatever it catches. Two simple parts instead of one fragile part.

  1. Create the destination folder in Drive first — for example Finance → Invoices → 2026. The rule needs somewhere to point before it exists.
  2. Create a Gmail filter that labels the right mail: open the search options, enter criteria like has:attachment from:client.com or a subject keyword, click Create filter, and choose Apply the label with a label like Invoices. If filters are new to you, our guide to [organizing your Gmail inbox with filters and labels](/blog/how-to-organize-gmail-inbox/) walks through the whole flow, including the retroactive "also apply to matching conversations" checkbox.
  3. Connect the saver. In Zapier, build a zap with Gmail's new-attachment trigger — narrowed to your label or sender in the trigger options — and Google Drive's upload-file action pointed at the folder from step 1. In Make, the same job is a scenario of Gmail's watch-emails module, an iterator over the attachments, and Google Drive's upload module.
  4. Test with a real message: email yourself an attachment from another account, confirm the filter labels it, then check the Drive folder a minute or two later.
Tip: Start the filter narrow — one sender or one subject keyword — and widen it after a week of clean results. A rule that misfiles receipts into your contracts folder is worse than no rule, because you stop checking the folder.

Every attachment a platform processes is a billed unit: a task on Zapier, a credit on Make. A quiet inbox never notices; 300 attachments a month blows past Zapier’s free 100 tasks in the first week — attachment rules are exactly the volume-style workflow where Make’s flat credit pricing keeps its lead as counts climb. If your monthly volume is high and the subscription math stops working, the Apps Script route below is the escape hatch.

The Free Route: Apps Script on a Schedule

If your volume is high and per-task fees are annoying, a short Apps Script running inside your own Google account does the job with no subscription. The tradeoff is immediacy: consumer accounts get time-driven triggers only, so attachments arrive on a schedule — hourly is the practical minimum — rather than the second they land. For invoices and contracts, an hour late is fine.

  1. In Drive, open the destination folder and copy its ID: the long string in the URL between /folders/ and the ?.
  2. Go to script.google.com and click New project.
  3. Paste the script below, replacing YOUR_FOLDER_ID, and save.
  4. Click Run once and approve the permission prompts. It asks for Gmail and Drive access — that is your own script asking you, not a third-party service.
  5. Open the Triggers panel (clock icon in the left sidebar) → Add Trigger → event source Time-driven → every hour.
function saveAttachments() {
  const folder = DriveApp.getFolderById('YOUR_FOLDER_ID');
  const label = GmailApp.getLabel('saved-to-drive') || GmailApp.createLabel('saved-to-drive');
  const threads = GmailApp.search('newer_than:2d has:attachment -label:saved-to-drive');
  threads.forEach((thread) => {
    thread.getMessages().forEach((message) => {
      message.getAttachments().forEach((file) => folder.createFile(file));
    });
    thread.addLabel(label);
  });
}

The duplicate guard is the whole script

The -label:saved-to-drive in the search plus the label applied at the end is not decoration. Without it, every hourly run re-saves every attachment from the past two days, and your folder fills with invoice (1).pdf, invoice (2).pdf, invoice (3).pdf before you notice. That is the first bug everyone hits with this script, and it is the first thing I check when someone says their Drive folder “went weird.”

Want only invoices? Tighten the search instead of adding logic: newer_than:2d has:attachment label:invoices -label:saved-to-drive.

What Works on Mobile (and What Doesn’t)

The Add to Drive button on attachments is desktop-only — the Gmail phone app doesn’t show it on attachment chips. Two phone paths genuinely work, with caveats:

  • Save the whole message as a PDF. Open the email, tap the three dots top-right, choose Print all, then tap the share icon in the print preview and pick Drive. Useful when the information you need is in the message body — a receipt summary, a confirmation — but attached files are not baked into that printout.
  • Don’t save attachments by hand at all. The automations above run server-side, so by the time you open the phone the file is already in Drive. Mobile is where you notice the system working, not where you feed it.

When It Goes Wrong

The Drive icon never appears on an attachment. Confidential mode first (lock icon next to the sender), then file type: some types can’t be stored in Drive at all. Neither is fixable from your side; ask the sender for a non-confidential resend if the file matters.

Files arrive as scan_0042 (3).pdf. Nothing in Gmail renames anything — every route above preserves the original filename. The fix is upstream: a naming convention for regular senders, a rename step in Zapier or Make built from email fields (sender plus date), or in Apps Script, calling setName() on the blob before createFile().

The rule silently stopped. Zapier pauses zaps on task overage and after a password change forces re-authentication; Make pauses scenarios when credits run out. After any password change, plan change, or overage warning, send yourself one test email with an attachment and confirm it lands. Thirty seconds, once a quarter, beats discovering the gap in tax season — and a recurring quarterly block in your calendar is what makes it actually happen; our guide to time blocking in Google Calendar covers the setup.

Duplicates appeared after editing the script. You renamed or removed the guard label, so the search no longer excludes processed threads. Restore the label name in both the search string and the addLabel line, and delete the duplicate copies — Drive keeps each as a separate file with its own ID, so nothing merges them back for you.

Frequently Asked Questions

Can Gmail save attachments to Google Drive automatically on its own?

Not on free or consumer accounts. Filters cannot touch attachments and there is no setting that does. The native exception is Workspace Studio on paid Google Workspace business plans. Everyone else uses an add-on, Zapier or Make, or Apps Script.

Where does “Add to Drive” put the file if I don’t choose a folder?

The root of My Drive. You can move it afterward in Drive itself, or repoint it from Gmail by hovering the attachment and clicking Organize in Drive. Saving is a copy, so the email keeps its own copy either way.

Do saved attachments count against my Google storage?

Yes, twice over in a sense: the copy inside the email counts toward your Gmail storage and the copy in Drive counts toward the shared 15 GB quota. If storage is tight, save selectively rather than hoarding every attachment in both places.

Is the Apps Script route really free?

Yes. Apps Script runs inside your Google account with no per-run fee and no subscription. The cost is latency and maintenance: consumer accounts get time-driven triggers only, so files arrive on the hour rather than instantly, and when the script errors you’re the one reading the log.

Can I save attachments from emails I already received?

Yes, route by route. The Apps Script search window is yours to widen — change newer_than:2d to cover the period you need, run once, then change it back. Manual Add to Drive works on any old message. Zapier and Make only process new matching mail unless you build a one-off bulk task.


Sources:

Written by

FazTest Editorial Team

The FazTest editorial team writes practical guides for the software you use every day — spreadsheets, documents, design tools, and automation. Every guide follows steps we completed ourselves first, verified against the current version of the tool — not marketing materials.

SpreadsheetsDocuments & NotesDesign & PresentationWorkflow & Automation