·Dioveo Team· 3 min read

How to Download All Invoices from Gmail at Once

Gmail
Attachments
Invoices
Finance
How to Download All Invoices from Gmail at Once

To download all invoices from Gmail, search has:attachment filename:pdf (invoice OR receipt) to surface them, then either save them email by email, run a Google Apps Script that copies matches to Drive, or use an attachment manager that downloads the whole result set in one click. This guide walks through each option, from free and manual to fully automated, so you can pick based on how many invoices you're dealing with.

If it's tax season and you're staring at a year of supplier emails, you're in the right place. The same steps work for receipts, bills, and statements.

Gmail's search operators do the heavy lifting. Paste this into the Gmail search bar:

has:attachment filename:pdf (invoice OR receipt OR facture OR bill)

A few refinements that help:

  • Limit by sender: add from:[email protected] to pull one vendor's history.
  • Limit by date: add after:2025/01/01 before:2026/01/01 for a tax year.
  • Catch non-PDF invoices: some vendors send .docx or images. Drop the filename:pdf part and scan the results, or run the search once per file type.

If you want a deeper tour of these operators, we've covered them in how to search Gmail attachments.

The catch: Gmail shows you the emails, not the files. You still have to open each message and click each attachment. For a handful of invoices that's fine. For a year of them, keep reading.

Option 1: Download Manually (Fine for Under ~20 Invoices)#

Open each email from your search results. When an email holds several attachments, hover over any of them and click Download all attachments to get a ZIP of that message's files. We've detailed that button in downloading all attachments from one email.

At roughly 30 seconds per email, 20 invoices costs you ten minutes. A few hundred costs you an afternoon. That's the point where the next options pay off.

Option 2: Google Apps Script (Free, Technical)#

A short Apps Script can loop over a Gmail search and save every attachment to a Drive folder. The skeleton:

function saveInvoices() {
  var threads = GmailApp.search('has:attachment filename:pdf (invoice OR receipt)');
  var folder = DriveApp.getFolderById('YOUR_FOLDER_ID');
  threads.forEach(function (thread) {
    thread.getMessages().forEach(function (message) {
      message.getAttachments().forEach(function (attachment) {
        folder.createFile(attachment.copyBlob());
      });
    });
  });
}

It works, but know the limits before you commit: Apps Script caps runtime at 6 minutes per execution, so large mailboxes need batching logic; duplicate filenames overwrite silently unless you handle them; and everything lands in one flat folder unless you write the organising code yourself.

Option 3: Bulk Download with an Attachment Manager (Fastest)#

This is what Dioveo was built for. It indexes your entire Gmail history, so instead of a search that returns emails, you get a table of the actual files:

  1. Sign in with Google (read-only access, no password shared).
  2. Type "invoice" in the search bar, or filter by your accountant's address, PDF file type, and a date range.
  3. Select all results and click download. Big batches arrive as ZIP archives organised by sender and year, with a manifest listing every file, its sender, and its date.

That folder structure matters more than it sounds: "Acme Billing/2025/invoice-0347.pdf" is audit-ready, while a flat dump of 400 files named invoice.pdf, invoice(1).pdf is a second cleanup job. The free plan covers up to 15 downloads a day, which handles small batches; Pro removes the cap.

If you want this to stay done, a workflow can auto-save every new invoice to Google Drive, Dropbox, or OneDrive the moment it arrives, so next tax season there's nothing to collect.

Keep Future Invoices Organised Automatically#

Whichever route you take today, set up one of these so you never repeat it:

  • A Gmail filter that labels incoming mail matching from:(billing@) has:attachment so invoices are pre-sorted.
  • A Dioveo smart folder with the keyword "invoice", which fills itself from your history and keeps collecting new matches.
  • An auto-save workflow that sends matching attachments straight to a cloud folder your accountant can access.

Frequently Asked Questions#

Can Gmail download all invoices at once natively? No. Gmail's "Download all attachments" works per email. There is no built-in way to download attachments across many emails in one action.

What about Google Takeout? Takeout exports your whole mailbox as an MBOX archive with attachments embedded inside it, not as separate files. It's a backup format, not an extraction tool. We've written up exactly what Takeout does and doesn't export.

Are the downloads safe? With Dioveo, access is read-only via Google's official API, certified under Google's CASA Tier 2 security review, and you can revoke it anytime from your Google account settings.

Keep reading