How to Automate Saving Email Attachments to Cloud Storage

Builder · Level 2 of 3

If you keep opening emails just to download the invoice, contract, or receipt attached to them, you can automate that step. A native Gmail or Outlook rule, or a small no-code automation, can watch your inbox and drop matching attachments straight into a Google Drive or OneDrive folder as they arrive — no manual downloading, no dragging files around. This guide covers both routes: what your email provider can do on its own, and when a tool like Make earns its keep instead.

Some links below are affiliate links. If you sign up through them, Automate My Life may earn a commission at no extra cost to you, which helps keep the site free. Only genuinely useful tools receive a recommendation.

Why manual attachment-saving breaks down

Saving a handful of attachments by hand is fine. The trouble starts at volume: a freelancer pulling five invoices a week, a household tracking every warranty and receipt, a small business forwarding contracts from three different inboxes. Each attachment means opening the email, finding the download icon, picking a folder, and renaming the file if you bother. Skip a step often enough and the folder structure falls apart: duplicate names, missing receipts at tax time, a contract you know arrived but can’t find. The fix is not a better filing habit. It’s routing the file before you ever have to think about it.

What “automatic” actually means here

This guide assumes you already use Gmail or Outlook for email and Google Drive or OneDrive for storage, since that’s the combination most readers land on and what the steps below are built around. Worth setting expectations up front: neither Gmail nor Outlook ships a one-click “auto-save attachments to my cloud drive” setting. Gmail’s filters can label, forward, archive, or star a message, but they can’t reach into Google Drive. Outlook’s rules can move, flag, or categorize mail, but they can’t push a file to OneDrive either. Getting genuinely hands-off saving means adding one small piece on top of the native rule: either a short script from the platform itself, or a no-code automation platform. Both options below are covered.

Option A: build it from pieces Google or Microsoft already give you

This route costs nothing beyond the tools you already have, but it takes a bit more setup and stays inside one ecosystem.

Gmail and Google Drive

Start with a filter so only the right messages get processed. In Gmail, click the search-options arrow in the search bar, enter your matching criteria (a sender like billing@vendor.com, a subject keyword like invoice, or has:attachment combined with a keyword), then choose Create filter. Set the filter to Apply the label (create one like Attachments/Process) and, optionally, Skip the Inbox so processed mail doesn’t clutter your view.

The label alone doesn’t move the file anywhere. It just marks which emails to process. To actually push matching attachments into Drive, add a small Google Apps Script with a time-based trigger. This runs entirely on Google’s own infrastructure, so there’s no third-party account or task quota involved:

  1. Go to script.google.com and start a new project.
  2. Paste in a script that searches Gmail for your label (for example label:Attachments/Process -label:Attachments/Done), loops through matching threads, saves each attachment to a target Drive folder, then relabels the thread so it isn’t processed twice.
  3. Under Triggers, add a time-driven trigger (hourly is typical) so the script runs on its own.
  4. Authorize Gmail and Drive access when prompted, since the script needs both scopes to read attachments and write files.

A minimal version of the save step looks like this:

function saveAttachments() {
  var folder = DriveApp.getFolderById('YOUR_FOLDER_ID');
  var threads = GmailApp.search('label:Attachments/Process -label:Attachments/Done');
  threads.forEach(function(thread) {
    thread.getMessages().forEach(function(message) {
      message.getAttachments().forEach(function(att) {
        folder.createFile(att);
      });
    });
    thread.addLabel(GmailApp.getUserLabelByName('Attachments/Done'));
  });
}

That’s the full worked example: filter and label in Gmail, then a script that reads the label and writes the files. It costs nothing and never leaves Google’s own systems — the tradeoff is that you’re maintaining a small script instead of a point-and-click setting.

Outlook and OneDrive

Outlook rules work the same way as Gmail filters here — useful for sorting, not for saving. In Outlook, go to Settings → Mail → Rules, add a rule matching your criteria, and set it to move matching mail into a folder like To Process. From there, Microsoft’s own no-code layer, Power Automate, picks up the job: search the Power Automate template gallery for a flow like “Save email attachments to OneDrive for Business,” point the trigger at your To Process folder, and set the action to create a file in your target OneDrive folder using the attachment’s name and content. Power Automate ships with most Microsoft 365 plans, so this doesn’t require a separate subscription for most business or school accounts. Personal Outlook.com accounts have a more limited free tier.

Option B: let an automation platform handle both sides

The scripted route above works, but it only moves attachments within one ecosystem: Gmail to Drive, or Outlook to OneDrive. If you want to route Outlook attachments into Google Drive, catch attachments from more than one inbox, or you’d rather not maintain a script, a no-code automation platform like Make covers the same job with a visual builder instead of code.

A basic scenario looks like this:

  1. Create a new scenario and add Gmail (or Outlook) as the trigger app, using the Watch Emails module filtered to a search query or a label, the same way you’d scope a filter.
  2. Add a Google Drive (or OneDrive, or Dropbox) module set to Upload a File, and map the incoming attachment data and target folder.
  3. Add a filter between the two modules so the scenario only runs when the email actually has an attachment matching your criteria, which keeps you from burning execution credits on every newsletter that lands in the label.
  4. Turn the scenario on and set the check interval; a 15-minute interval is close enough to instant for most receipts and invoices without wasting credits on constant polling.

This beats the native-tools route when the file needs to cross platforms (Outlook to Drive, Gmail to Dropbox), when more than one inbox feeds the same folder, or when you’d simply rather not touch a script. It costs more to run at volume: Make’s free plan includes 1,000 operations a month, which covers a modest attachment volume, and paid plans start around $12–$21 a month once you outgrow that. Zapier offers a comparable Gmail-to-Drive automation on its free plan, capped at 100 tasks a month, with paid plans starting near $20 a month.

Native rules vs. an automation platform

Native rule + scriptAutomation platform (Make)
CostFreeFree tier, then ~$12–$21/mo at volume
Setup effortHigher: requires a short scriptLower: visual builder, no code
Cross-platform (e.g. Outlook → Drive)NoYes
Multiple inboxes into one folderAwkwardStraightforward
Ongoing maintenanceYou own the scriptPlatform handles the plumbing

Naming and folder-structure conventions that keep this maintainable

An automation that dumps every attachment into one flat folder just moves the mess from your inbox to your Drive. Set the structure up front:

  • One parent folder per category, such as Receipts, Invoices, or Contracts, rather than one folder per sender.
  • A consistent file-name pattern the automation can build without your input, such as YYYY-MM-DD_Sender_Subject, so files sort chronologically without manual renaming.
  • A dated subfolder per year (Receipts/2026) once a category folder starts collecting more than a couple hundred files. Both Drive and OneDrive slow down noticeably once a single folder holds several thousand items.
  • A separate label or rule per category rather than one broad rule for “anything with an attachment,” so a random newsletter PDF doesn’t land in your tax folder.

Failure modes to expect

This kind of automation is reliable, not perfect. Plan for a few known failure points rather than being surprised by them:

  • False positives. A broad keyword match (“invoice,” “receipt”) will occasionally catch a newsletter or forwarded thread that happens to use the same word. Tighten the filter to a specific sender domain where you can.
  • False negatives. A vendor that changes its sending address or subject-line format will silently stop matching your rule. Nothing errors out — the attachment just never arrives, which is why a periodic spot-check matters (see below).
  • Duplicate files. If a script or scenario reprocesses a thread, because a label didn’t apply correctly or a scenario reran after an error, you’ll get a second copy of the same file. Naming by date and sender makes duplicates easy to spot and delete.
  • Missed attachments in encrypted or password-protected emails. Some banks and vendors send statements as password-protected PDFs or through a secure portal link rather than a plain attachment; no automation on this list can open those for you.
  • Provider rate limits. Google Apps Script and Power Automate both cap how often a trigger can run and how much data it can move per day; a script polling every few minutes on a busy inbox can hit those ceilings. Hourly is a safer default than “as often as possible.”

How much upkeep this actually takes

Once the rule or scenario is running, plan on a five-minute check every month or two: skim the target folder for anything that looks miscategorized, confirm a vendor hasn’t changed its sending address, and clear out any obvious duplicates. The scripted Gmail route needs slightly more attention: Google occasionally asks you to re-authorize a script after months of inactivity, and a broken trigger fails silently rather than sending an alert. An automation-platform scenario like Make will flag failed runs in its dashboard, which makes it easier to notice when something breaks.

Who should skip this

If you get one or two attachments worth saving a month, the setup time here outweighs the payoff — just keep clicking the Drive icon on the attachment when it matters. The same goes for a one-off need, like archiving attachments from a single event or project: build the automation only if you expect to need it again. And if most of what you receive arrives through secure portals or password-protected files rather than plain attachments, none of the routes above will do the saving for you, and it’s not worth building around the exceptions.

Where to go from here

If your Gmail filters aren’t doing much beyond this yet, Gmail Filters and Labels: Automate Your Inbox in 30 Minutes covers the rest of the setup this guide builds on. And if the attachments you’re routing are part of a bigger pile of half-organized work information, ChatGPT Projects: How to Organize Your Work in One Place is a reasonable next stop.

Start with whichever option matches what you already pay for. If Google Drive or OneDrive is already part of a plan you have, the native route costs nothing but a bit of setup time. If you’re routing attachments across more than one provider, Make will save you more time than it costs.