·Updated ·Dioveo Team· 6 min read

How to Download All Invoices from Gmail at Once

Gmail
Attachments
Invoices
Finance

Short answer

To download a year of invoices from Gmail at once, use Dioveo: connect Gmail with Google, wait for indexing to finish, search your PDFs by sender and date, and choose Download all matches. You get one ZIP, or numbered parts, in a layout you choose, such as By sender, then year, with a manifest.csv listing the files. Receipts that exist only in the email text need another method.

Without a tool, in Gmail on a computer, search has:attachment filename:pdf (invoice OR receipt) and save the attachments email by email, or run a free Google Apps Script that saves the attachments of matching conversations to a Drive folder. Gmail's Download all attachments icon covers one email at a time.

How to Download All Invoices from Gmail at Once

To download invoices from Gmail, search has:attachment filename:pdf (invoice OR receipt), then save them email by email, run a free Google Apps Script that copies matches to Drive, or use Dioveo to download one ZIP, or numbered parts, in a layout you choose, such as by sender, then year. 50 files a month are free. Pro is $14.99 per month or $119 per year. This guide walks through each option.

If it's tax season and you're staring at a year of supplier emails, you're in the right place, and if the goal is to hand a full year of invoices to your accountant, there is a step-by-step for exactly that. The same steps work for receipts, bills, and statements.

Watch it in under two and a half minutes

Pressing play loads the video from YouTube (Google).

First, Search Gmail for Your Invoices#

One Gmail search finds the emails that hold your invoices. Paste this into the Gmail search bar. Google's search help lists has:attachment, filename:, from:, after: and before: and the OR operator (checked December 4, 2026):

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

A few refinements that help:

  • Limit by sender: add from:billing@supplier.com to pull one vendor's history. Google's help shows from: with a person or an address.
  • 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, Gmail on a computer shows a Download all attachments icon in the row above the attachment thumbnails. In our test it saved that email's attachments as a single ZIP file (two PDFs, Chrome on a Mac, checked November 30, 2026). We've detailed that button in downloading all attachments from one email.

If each email takes you about 30 seconds, 20 invoices cost you ten minutes and a few hundred cost you an afternoon. That is 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 the attachments of the matching conversations 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());
      });
    });
  });
}

Know what it does before you run it. GmailApp.search returns conversations (threads), and the script saves the attachments of the messages in each matching conversation. That includes messages that do not match your search and files that are not PDFs. Google's reference says getAttachments() includes inline images by default, so logos in signatures can land in the folder too. The files land in one flat folder unless you write the organising code yourself.

A large mailbox needs batching. Google's Apps Script quotas list 6 minutes per execution for both personal and Google Workspace accounts (checked December 4, 2026). Google's reference for GmailApp.search also says the call fails when the threads are too large for the system to handle, and points to the version that takes a start index and a maximum number of threads. Google's reference for creating a Drive file does not say how files with the same name are handled, so run the script on a small search first and look at the folder.

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

This is what Dioveo was built for. It indexes the attachments in your Gmail mailbox, except Spam and Trash, so instead of a search that returns emails, you get a table of the actual files:

  1. Sign in with Google (official OAuth, 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. Choose Download all matches, pick a layout such as By sender, then year, and click Download. You get one ZIP, or numbered parts, with a manifest.csv listing the files.

The folder layout saves a second cleanup job. With By sender, then year, a file lands at a path such as Acme Billing/2025/invoice-0347.pdf, while a flat dump of 400 files named invoice.pdf, invoice(1).pdf leaves the sorting to you. The Free plan includes 50 files a month across downloads and manual cloud saves. Pro has no monthly limit on them.

If you want this to stay done, a workflow can auto-save new invoices to Google Drive, Dropbox, or OneDrive, usually within 15 minutes of arriving, so next tax season there's nothing to collect. And if what you actually need is the data rather than the files, Dioveo can turn the invoices in your Gmail into a spreadsheet, one row per invoice, kept up to date as new ones arrive.

Keep Future Invoices Organised Automatically#

To stop repeating the search, set up one of these three after your first download:

  • A Gmail filter that labels incoming mail from a supplier, such as from:billing@supplier.com has:attachment, so invoices are pre-sorted. Google's help says a filter can send mail to a label, or archive, delete, star or forward it (checked December 4, 2026).
  • A custom folder in the Dioveo Library with a rule that matches "invoice", so the matching attachments from your mailbox show up in that folder.
  • An auto-save workflow in Dioveo that sends matching attachments straight to a cloud folder your accountant can access.

If you want Claude to read the invoices after finding them, see how to read Gmail PDF attachments with Claude.

Frequently Asked Questions#

Can Gmail download invoices in bulk natively?

Not from the email list. Gmail's Download all attachments icon works on the email you have open. With three emails ticked in the list, Gmail on the web offered no download option for their attachments (our test mailbox, checked November 30, 2026). Google's own download help describes saving attachments from an open message.

What about Google Takeout?

Takeout exports your Gmail messages in MBOX format, as its own screen shows (checked November 30, 2026). Google's Gmail export help lists attachments among what the download includes (checked December 4, 2026), and in an MBOX file they sit inside the archive rather than 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 via Google's official OAuth API, downloading does not remove anything from your mailbox, and you can revoke the connection from your Google account settings.

How much does it cost to download a year of invoices?

The free plan covers 50 files a month for downloads and manual cloud saves, which fits a small year. Pro is $14.99 per month or $119 per year with no monthly limit on downloads. Export all attachments is $19 once.

How this was checked#

On December 4, 2026 we read Google's help for Gmail search operators, creating a filter, downloading attachments and exporting Gmail data, the Apps Script quotas page, and the Apps Script references for GmailApp, GmailMessage and Drive folders. We did not run the sample script. The Download all attachments result and the Takeout screen come from our test mailbox on November 30, 2026 and were not repeated on December 4. The Dioveo steps, layout names and plan limits come from our own product code.

Stop managing attachments by hand

Dioveo finds the attachments in your Gmail, lets you search and download them in bulk, and auto-saves new ones to Google Drive, Dropbox, or OneDrive.

Permanent Free plan Cancel from your billing portal

Keep reading