How to Save Gmail Attachments to Google Drive Automatically
·Dioveo Team

How to Save Gmail Attachments to Google Drive Automatically

Gmail
Attachments
Google Drive
Automation
Productivity

You get a contract in your inbox. You download it. You upload it to Google Drive. You create a folder for it. Then another attachment comes in, and you do the whole thing again.

If this sounds like your daily routine, you're not alone. Most Gmail users handle dozens of attachments every week, and the manual process of saving each one to Google Drive eats up more time than anyone wants to admit. The good news? There are several ways to automate this entirely, from simple built-in features to powerful scripting solutions.

This guide walks you through every method available in 2026, starting with the easiest options and working up to fully automated workflows.

Why Save Gmail Attachments to Google Drive?

Before jumping into the how, let's talk about the why. There are a few compelling reasons to move your attachments out of Gmail and into Drive:

Storage consolidation. Gmail and Google Drive share the same 15GB of free storage on your Google account. Attachments sitting in your inbox count against that limit. By organizing them in Drive (and optionally removing the emails), you gain more control over what's using your space.

Easier access and sharing. Files in Google Drive are searchable, shareable, and accessible from any device. An attachment buried in a three month old email thread? Good luck finding that quickly. The same file in a well organized Drive folder? Two clicks away.

Backup and version control. Google Drive keeps revision history and integrates with desktop sync tools. Your attachments become part of a proper file management system instead of floating in your inbox.

Collaboration. When files live in Drive, you can share them with teammates, set permissions, and collaborate in real time. None of that works when the file is trapped inside someone's email.

Method 1: Save Attachments Manually from Gmail

This is the most basic approach, but it's worth covering because many users don't realize Gmail has a built in "Save to Drive" button.

Step by Step Instructions

  1. Open the email containing the attachment
  2. Hover over the attachment thumbnail at the bottom of the email
  3. Look for the Google Drive icon (a triangle) that appears on hover
  4. Click it to save the file directly to your Google Drive
  5. By default, files go to a folder called "Email attachments" in your Drive root

Saving Multiple Attachments at Once

If an email has several attachments, you'll see a "Save all to Drive" option above the attachment thumbnails. This saves every file from that email in one click.

Limitations of the Manual Approach

This method works fine for occasional use, but it falls apart when you're dealing with volume. You still need to open each email individually, click the save button, and then organize the file into the right folder. For anyone receiving more than a handful of attachments per day, this quickly becomes unsustainable. If you have a large backlog to deal with, it can be faster to bulk download them first and then sort the files into Drive in one pass.

Method 2: Use Google Apps Script for Automatic Saving

Google Apps Script is a free, built in scripting platform that connects Gmail, Drive, and other Google services. You can write a script that automatically scans your inbox for new attachments and saves them to a specific Drive folder.

Setting Up the Script

  1. Go to script.google.com and create a new project
  2. Delete any placeholder code in the editor
  3. Paste the following script:
function saveAttachmentsToDrive() {
  var folderId = 'YOUR_DRIVE_FOLDER_ID';
  var folder = DriveApp.getFolderById(folderId);
  var label = GmailApp.getUserLabelByName('processed-attachments');

  if (!label) {
    label = GmailApp.createLabel('processed-attachments');
  }

  var threads = GmailApp.search('has:attachment -label:processed-attachments', 0, 50);

  for (var i = 0; i < threads.length; i++) {
    var messages = threads[i].getMessages();
    for (var j = 0; j < messages.length; j++) {
      var attachments = messages[j].getAttachments();
      for (var k = 0; k < attachments.length; k++) {
        var attachment = attachments[k];
        // Skip inline images
        if (attachment.getSize() > 0 && !attachment.isGoogleType()) {
          folder.createFile(attachment);
        }
      }
    }
    threads[i].addLabel(label);
  }
}
  1. Replace YOUR_DRIVE_FOLDER_ID with the actual ID of your target folder (find this in the folder's URL in Google Drive)
  2. Save the project and run the function once to authorize permissions

Setting Up a Timed Trigger

To make this run automatically:

  1. In the Apps Script editor, click the clock icon (Triggers) in the left sidebar
  2. Click "Add Trigger"
  3. Set the function to saveAttachmentsToDrive
  4. Choose "Time-driven" as the event source
  5. Select your preferred interval (every 5 minutes, hourly, or daily)
  6. Save the trigger

Customizing the Script

You can modify the Gmail search query to target specific attachments:

  • from:[email protected] has:attachment saves only attachments from a specific sender
  • has:attachment filename:pdf saves only PDF files
  • has:attachment after:2026/01/01 saves attachments from a specific date range
  • label:invoices has:attachment saves attachments from emails with a specific label

Limitations of Apps Script

While powerful, Apps Script has some constraints worth knowing about:

  • Execution time limits. Scripts can run for a maximum of 6 minutes per execution. If you have thousands of unprocessed emails, the script may time out before finishing.
  • Quota limits. Free Google accounts have daily limits on how many emails you can read and how many files you can create via script.
  • No subfolder organization. The basic script dumps everything into one folder. You'll need additional logic to sort files by sender, date, or file type.
  • Maintenance burden. Scripts break. Google updates APIs. When something goes wrong, you need to debug it yourself or find someone who can.

Method 3: Use Google Workspace Add ons

If you'd rather not write code, several add ons in the Google Workspace Marketplace can automate attachment saving. These install directly into Gmail and provide a visual interface for setting up rules.

Popular Options

Save Emails and Attachments is one of the more established add ons. It lets you create rules based on sender, subject line, label, or date range, then automatically saves matching attachments to designated Drive folders.

Email to Drive offers similar functionality with a focus on scheduled batch processing. You set up which emails to target and when to run the extraction.

How to Install and Configure

  1. Open Gmail in your browser
  2. Click the grid icon in the right sidebar to open the add ons panel
  3. Click "Get add ons" at the bottom
  4. Search for your chosen attachment saver
  5. Install and grant the required permissions
  6. Configure rules through the add on's settings panel

Things to Watch Out For

Most add ons require broad access to your Gmail and Drive accounts. Before installing, review the permissions carefully. Some add ons also have freemium pricing models where the free tier limits how many emails you can process per day.

Method 4: Use Zapier or Make (Integromat) for Cross Platform Automation

If you need attachments saved to locations beyond Google Drive, or you want to trigger additional actions when an attachment arrives, workflow automation platforms are the way to go.

Setting Up a Zap in Zapier

  1. Create a new Zap with "Gmail: New Attachment" as the trigger
  2. Choose "Google Drive: Upload File" as the action
  3. Map the attachment data from Gmail to the Drive upload
  4. Configure the destination folder
  5. Test and enable the Zap

Setting Up a Scenario in Make

  1. Create a new scenario
  2. Add the Gmail module and select "Watch Emails"
  3. Add a Google Drive module and select "Upload a File"
  4. Connect the attachment output from Gmail to the Drive input
  5. Set the schedule and activate

Advantages of Workflow Platforms

These tools shine when you need complex workflows. For example, you could set up a flow that saves PDF attachments to Drive, sends a Slack notification, logs the file details in a spreadsheet, and archives the original email. That level of orchestration is difficult with Apps Script alone. If your goal is to back up to Dropbox or OneDrive instead of Google Drive, these platforms (or a dedicated tool) are the cleanest route.

Downsides

Cost is the biggest factor. Zapier's free plan allows only 100 tasks per month, which won't cover heavy attachment volumes. Make is more generous but still has limits. Both platforms also add a dependency on a third party service, meaning your automation breaks if the platform has an outage or changes its pricing.

Method 5: Use a Dedicated Attachment Management Tool

The methods above all work, but they share a common problem: you're building and maintaining the solution yourself. For users who want something that just works out of the box, a dedicated attachment management tool is the most practical option.

Dioveo is designed specifically for this use case. It connects to your Gmail account, automatically scans for attachments, and gives you a clean dashboard to browse, search, and organize everything. Instead of cobbling together scripts and add ons, you get a purpose built tool that handles the entire workflow.

What makes a dedicated tool different from the DIY approaches:

  • Zero setup. Connect your Gmail account and Dioveo immediately starts cataloging your attachments. No scripts to write, no triggers to configure.
  • Smart organization. Files are automatically organized and searchable by sender, date, file type, and size. No manual folder sorting required. You can also build rule-based attachment workflows so each type of file lands in exactly the right folder.
  • Cloud storage integration. Save attachments to Google Drive, Dropbox, or other cloud storage with one click or set up automatic rules.
  • Storage insights. See exactly which attachments are consuming your Google storage and clean up what you don't need.

If you've tried the manual route and found it unsustainable, or if you started with Apps Script and got tired of maintaining it, a dedicated tool removes all that friction.

Organizing Your Google Drive for Attachments

Whichever method you choose, having a solid folder structure in Google Drive makes a huge difference. Here's a system that works well for most people:

Recommended Folder Structure

📁 Email Attachments
  📁 By Sender
    📁 Clients
    📁 Vendors
    📁 Internal
  📁 By Type
    📁 Documents
    📁 Images
    📁 Spreadsheets
    📁 PDFs
  📁 By Project
    📁 Project Alpha
    📁 Project Beta
  📁 Archive
    📁 2025
    📁 2026

Tips for Staying Organized

Use consistent naming. Rename files as they come in (or set up rules to do it automatically). A file named "Invoice_ClientName_April2026.pdf" is infinitely more useful than "attachment(3).pdf".

Archive regularly. Move older attachments to year based archive folders. This keeps your active workspace clean while preserving access to historical files.

Set up starred or shortcut folders. For folders you access frequently, add them to your Drive favorites or create desktop shortcuts.

Review storage quarterly. Set a reminder to check your Google storage usage every few months. Delete duplicate files, remove attachments you no longer need, and consider upgrading your storage plan if you're consistently running low.

Handling Common Issues

Duplicate Files

When you automate attachment saving, duplicates become a real problem. If someone replies to an email thread and the original attachment is included again, most automation tools will save it as a new file.

Solutions:

  • Use scripts that check for existing filenames before saving
  • Set up your automation to only process emails with a specific label
  • Use a tool like Dioveo with rules that only match the emails you actually need

Large Files and Storage Limits

Google Drive's free tier gives you 15GB shared across Gmail, Drive, and Google Photos. If you're saving large attachments regularly, you'll hit that limit fast.

Solutions:

  • Compress files before saving (or use a script that compresses automatically)
  • Upgrade to Google One for 100GB ($1.99/month) or more
  • Periodically clean out files you no longer need

Permission and Security Concerns

Granting third party tools access to your Gmail raises valid security questions. Here's how to minimize risk:

  • Only use tools with clear privacy policies and established track records
  • Review app permissions in your Google Account settings regularly
  • Revoke access for tools you no longer use
  • Prefer tools that use OAuth and don't store your email password

Comparing All Methods at a Glance

MethodDifficultyCostAutomationBest For
Manual saveEasyFreeNoneOccasional use
Apps ScriptMediumFreeFullTechnical users
Workspace add onsEasyFree/PaidPartialNon technical users
Zapier/MakeEasyPaidFullComplex workflows
Dedicated tool (Dioveo)EasyPaidFullHeavy attachment users

Frequently Asked Questions

How do I automatically save Gmail attachments to Google Drive?

The simplest free method is a Google Apps Script with a time-based trigger: it scans a search query like has:attachment -label:processed-attachments, saves each attachment to a Drive folder, and labels the thread so it isn't processed twice. For a no-code option, a Workspace add-on, a Zapier or Make automation, or a dedicated attachment manager can watch your inbox and save matching attachments to Drive based on rules you define (sender, file type, label, or subject).

Why won't my Gmail attachment save to Drive?

A few common causes: you're out of Google storage (Gmail and Drive share the same 15 GB free quota, so a full account blocks new files), the attachment is a Google-native file or inline image rather than a real attachment, or a script hit its 6-minute execution limit or daily quota before reaching that message. Free up storage, confirm the file is a genuine attachment, and re-run the save for that specific email.

Can I save attachments from old emails too?

Yes. Built-in tools like the "Save to Drive" button work on any email regardless of age. With Apps Script, add a date range to the search query (for example has:attachment after:2024/01/01 before:2025/01/01) and run it manually to backfill historical messages. A dedicated tool with bulk export can process your entire history in one operation instead of email by email.

Is it free to save Gmail attachments to Drive?

Yes for the methods that use Google's own tools: the manual "Save to Drive" button and Apps Script are both free, limited only by your 15 GB of shared Google storage and Apps Script's daily quotas. Most third-party add-ons and automation platforms (Zapier, Make) and dedicated managers have a free tier with usage caps and paid plans above that limit.

Conclusion

Saving Gmail attachments to Google Drive doesn't have to be a manual chore. Whether you use Gmail's built in save button, write a custom Apps Script, install a Workspace add on, connect a workflow platform, or use a dedicated tool, the right approach depends on your volume, technical comfort, and budget.

For most users who deal with attachments daily, the combination of a clean Drive folder structure and an automated saving solution will save hours every month. If you want the simplest path to getting organized, Dioveo saves attachments to Drive automatically so you can stop doing it by hand.