How to Bulk Download Gmail Attachments
Yes, you can download Gmail attachments in bulk, and you don't need a paid tool to do it. Gmail has a built-in "Download all attachments" button for a single email, Google Takeout can export your entire mailbox, and a short Google Apps Script can save every attachment matching a search straight to Google Drive. This guide covers each method in order, from the quickest free option to a fully automated workflow, so you can pick the one that fits your situation.
Whether you're an accountant pulling a year of invoices, a project manager collecting deliverables, or just someone trying to clean out an inbox, here's exactly how to get your files out of Gmail at scale.
A quick note before you start: if you haven't narrowed down which files you actually need yet, it's worth learning the search operators to find the exact attachments first. A precise query like has:attachment filename:pdf from:[email protected] makes every method below faster, because you're working with a clean set of results instead of your whole mailbox.
How to Download All Attachments from a Single Email
This is the feature most people miss. When a single email has multiple attachments, Gmail can bundle every file into one ZIP download in a single click, so you don't have to save them one at a time.
- Open the email that contains the attachments.
- Scroll to the attachment thumbnails at the bottom of the message.
- Hover near the top-right of the attachment area. A small Download all attachments button appears (it looks like a download arrow).
- Click it. Gmail packages every attachment in that email into a single
.zipfile and downloads it to your computer.
That ZIP lands in your browser's default download folder. Unzip it and you have every file from that email, with original filenames preserved.
The catch is scope: this only works one email at a time. There is no native "select multiple emails and download all their attachments" button in Gmail. If you have ten emails each with attachments, you'd repeat this ten times. For a handful of messages that's fine. For dozens or hundreds, you'll want one of the bulk methods below.
How to Bulk Download Attachments with Google Takeout
Google Takeout is Google's official data export service, and it can hand you a copy of your entire Gmail account, attachments included.
- Go to takeout.google.com while signed into your account.
- Click Deselect all so nothing is selected.
- Scroll down and check only Mail.
- (Optional) Click All Mail data included to limit the export to specific labels instead of your whole mailbox, which keeps the download smaller.
- Click Next step, choose your delivery method (email link, Drive, Dropbox, or OneDrive), file type (
.zip), and size, then click Create export. - Google compiles the archive in the background. For large mailboxes this can take anywhere from minutes to a day or more, and you'll get an email when it's ready.
Set your expectations here. Takeout does not give you a tidy folder of individual attachment files. It exports your mail in MBOX format, which is a single large file containing every message with its attachments encoded inline. To get usable files back out, you need an MBOX reader (Thunderbird can import it) or a script to parse the attachments. It's a true backup of everything, but it's messy and not "per file."
Takeout is the right tool when you want a complete archive before a big cleanup. If your goal is to free space afterward, pair it with our guide to free up Gmail storage after downloading. But if you just want the actual attachment files in a folder, the Apps Script method below is far more direct.
How to Bulk Download Gmail Attachments with Google Apps Script
Google Apps Script is a free scripting platform built into your Google account. With about a dozen lines of code, you can iterate over a Gmail search and save every matching attachment straight into a Google Drive folder, no MBOX parsing required.
Step 1: Create the script
- Go to script.google.com and create a new project.
- Delete the placeholder code.
- Paste the following:
function bulkDownloadAttachments() {
// The Drive folder where attachments will be saved
var folder = DriveApp.getFolderById('YOUR_DRIVE_FOLDER_ID');
// Adjust this query to match the attachments you want
var query = 'has:attachment -label:downloaded';
var label = GmailApp.getUserLabelByName('downloaded')
|| GmailApp.createLabel('downloaded');
var threads = GmailApp.search(query, 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 file = attachments[k];
// Skip inline images and Google-native files
if (file.getSize() > 0 && !file.isGoogleType()) {
folder.createFile(file);
}
}
}
threads[i].addLabel(label); // mark as processed so it isn't saved twice
}
}
Step 2: Point it at a folder and run it
- Create (or open) a folder in Google Drive and copy its ID from the URL: the part after
folders/. - Paste that ID in place of
YOUR_DRIVE_FOLDER_ID. - Edit the
queryto target what you need, using the same operators you'd type into Gmail's search bar (for examplehas:attachment filename:pdf from:[email protected] after:2025/01/01). - Save, then click Run. Authorize the permissions the first time.
The script grabs up to 50 threads per run, saves their attachments to Drive, and applies a downloaded label so the same files aren't saved twice. Run it again to process the next batch, or add a time-based trigger (the clock icon in the editor) to have it run on a schedule.
A couple of limits to know: Apps Script executions cap at six minutes each, and free accounts have daily quotas on how many files you can create. For very large mailboxes you'll run it in batches. This is the same approach we cover in more depth in the guide to saving Gmail attachments to Google Drive automatically — once your files are in Drive, you've effectively bulk downloaded them and they're searchable and shareable.
How to Download Gmail Attachments on iPhone and Android
Mobile is where bulk download gets frustrating, because the Gmail apps have no "Download all attachments" button and no multi-select for files. You're working one attachment at a time.
On both iPhone and Android, the flow is:
- Open the email in the Gmail app.
- Tap the attachment to preview it.
- Tap the share or download icon (a share-sheet arrow on iOS, a download arrow on Android).
- Choose where it goes: Save to Files (iOS), Download to local storage (Android), or Save to Drive to push it to Google Drive.
If you have the Google Drive app installed, "Save to Drive" is usually the smoothest path on mobile, since it keeps files accessible across devices.
The honest limitation: there's no true bulk download on mobile. If you have many attachments to pull, the realistic move is to do it from a desktop browser using the methods above, or run the Apps Script (it runs in the cloud, so it works no matter what device you're on). Mobile is best for grabbing one or two files on the go.
Comparison: Which Bulk Download Method Should You Use?
Each method trades off convenience, scope, and cost. Here's how they stack up:
| Method | Best for | Bulk? | Saves to cloud? | Free? |
|---|---|---|---|---|
| Native "Download all" | One email with several files | Per email only | No (downloads a ZIP locally) | Yes |
| Google Takeout | A full archive/backup of everything | Yes (whole mailbox) | Optional (Drive, Dropbox, OneDrive) | Yes |
| Apps Script | Saving attachments matching a search to Drive | Yes (by query, in batches) | Yes (Google Drive) | Yes |
| Dioveo | Hands-off, repeatable bulk + auto-filing | Yes (across full inbox) | Yes (Drive, Dropbox, OneDrive) | Free tier, then paid |
In short: use Native "Download all" for a single email, Takeout for a complete backup, Apps Script when you want actual files in Drive and don't mind a little setup, and a dedicated tool when you want it to keep happening automatically without maintenance.
Bulk Download and Auto-File with Dioveo
The free methods above all work, but they share one downside: you run them yourself, every time, and a script breaks when Google changes an API. If you bulk download attachments regularly, that maintenance adds up.
Dioveo is built for exactly this. It connects to your Gmail account using official Google APIs (OAuth only, so it never sees your password), indexes every attachment across your full mailbox history, and lets you select and download files in bulk, or save them straight to Google Drive instead of your computer. You can filter by sender, date, file type, or keyword, and set rules so future attachments file themselves.
Being honest about the trade-offs: Dioveo is Gmail-only (it saves to Google Drive, Dropbox, and OneDrive), and while there's a free tier, heavier volume moves you onto a paid plan. If those fit, it removes the manual step entirely.
Ready to stop downloading attachments by hand? Automate bulk downloads with Dioveo and let your inbox file itself.
Frequently Asked Questions
Can I download all Gmail attachments at once?
Not with a single native button across your whole mailbox. Gmail's "Download all attachments" works per email (it bundles that email's files into one ZIP). To download everything at once, use Google Takeout for a full MBOX export, a Google Apps Script to save attachments matching a search into Drive, or a dedicated tool like Dioveo that handles your entire inbox in one pass.
How do I download attachments from multiple emails?
Gmail has no multi-select for downloading attachments across emails. Your options are: open each email and click "Download all attachments" individually, run Google Takeout to export them all in an MBOX archive, or use a Google Apps Script that loops through a search query (for example has:attachment from:[email protected]) and saves every matching attachment to a Drive folder.
Is there a free way to bulk download Gmail attachments?
Yes. Both Google Takeout and Google Apps Script are completely free and built into your Google account. Takeout gives you a full backup in MBOX format, while Apps Script saves individual attachment files directly to Google Drive based on a search you define. The native per-email "Download all" button is free too, it's just limited to one email at a time.
Where do downloaded Gmail attachments go?
When you use the native "Download all attachments" button, the ZIP file lands in your browser's default download folder. With Apps Script or a tool like Dioveo, files are saved to the Google Drive folder you specify. On mobile, you choose the destination (Files, local Downloads, or Drive) from the share sheet.