We Imported 1,400 Gmail Attachments. Here Is What Got Filed
Founder and CEO, The Drive AI
TL;DR: In September 2026 we ran Historical Sync on a Gmail account at The Drive AI that had been collecting invoices and bills for years. It brought in 1,400+ attachments, saved as they were at the top level of the workspace. One workflow watching that folder then read each file, including scanned and photographed ones, and filed it by vendor and year with a name taken from the document. Nothing in Gmail changed. This is what that looked like, including the parts that needed a person.
Disclosure: this is The Drive AI's own account and our own product. The numbers are what the import and the workflow reported; where we did not keep a figure, we say so rather than estimate.
What was in the inbox?
The usual thing. A founder's Gmail that every SaaS subscription, utility, contractor and accountant had been sending documents to since the company started. Invoices as PDFs, bills as PDFs and as photos, receipts forwarded from a phone, the occasional statement. None of it had been downloaded, because Gmail search mostly found what was needed, until it did not: an accountant asking for every invoice from one vendor across two years is a search that takes an afternoon.
The question was whether the backlog could be filed without anyone opening 1,400 messages.
How did the import work?
Historical Sync is the one-time import on a connected Gmail or Outlook account. In Settings, open the account's menu, choose Historical sync, pick a time range (the last 30, 90 or 180 days, or up to a year on Outlook) and whether to include sent mail, and start it. It runs in the background and reports how many messages it has processed and how many files it imported or skipped.
Two things about the import are worth knowing before you run one, because they shaped everything after:
- Imported attachments land at the top level of the workspace, as they are. The import does not rename or file anything. It gave us 1,400+ files with the names their senders used:
invoice.pdf,Invoice_88213.pdf,IMG_4471.jpg,scan.pdf. - Imported attachments do not start Email Attachment workflows. Those run on mail that arrives after you connect. The backlog needs a workflow that watches new files in the workspace instead, which is what we used.
It skipped calendar invitations, anything from a blocked sender, and attachments whose content it had already imported, so the forwarded-twice receipts came in once.
What did the workflow do with 1,400 files?
The workflow was one sentence, typed once:
When a file lands here, read it. If it is an invoice, rename it "Invoice - Vendor - Date - Amount" and file it under Finance/Invoices by vendor and year. If it is a bill, rename it "Bill - Provider - Month" and file it under Finance/Bills by provider and month. If you are not sure what it is, ask me.
The steps drawn from it were the app's own: Read Details from File pulled the vendor or provider, the document date and the amount off each page; Ask AI About the File decided invoice, bill or unsure; Rename and Move applied the pattern and the folder; Ask a Person to Approve held the unsure ones.
The result for an invoice that arrived as Invoice_88213.pdf was Finance/Invoices/Northwind/2025/Invoice - Northwind - 2025-03-14 - 1,240.00.pdf. A photographed electricity bill named IMG_4471.jpg became Finance/Bills/Pacific Power/2025-06/Bill - Pacific Power - 2025-06.pdf-style naming in its own folder. Folders named in the instructions were created as the first file for each vendor arrived.
The filing ran unattended. Most of the 1,400 files were invoices and bills, which is why one sentence covered them; an inbox with contracts, resumes and photos would need a branch for each.
Did OCR handle the scans and photos?
Yes. The attachments that were scans or photos of paper, mostly bills and receipts, were read the same way as the PDFs with real text: the provider, the date and the amount came off the image and went into the name and the folder. We did not keep a separate count of how many files needed OCR.
One current caveat: as documented today, Historical Sync skips image files, so check what the import panel reports as skipped before counting on photos. Scanned PDFs are imported and read. For a photo backlog, the document scanner apps that save PDFs are the cleaner route.
What still needed a person?
The unsure branch. Files the workflow could not confidently call an invoice or a bill waited in Approvals: a quote formatted like an invoice, a statement that listed several invoices, a receipt with the total torn off in the photo. Each showed the planned name and destination, and approving or rejecting took a few seconds per file. We did not record the count; it was a small fraction, and they were the files a person would have had to read anyway.
That is the trade the approval step makes. The AI steps carry a badge that says they can occasionally be wrong, so the workflow asks on exactly the files where being wrong would cost something, and files the rest.
What did it not do?
- It did not touch Gmail. Every message is where it was, with its attachment. The workspace holds copies.
- It did not file the images the import skipped, if any were skipped; see the caveat above.
- It did not fill in a missing invoice. Nothing in the workflow tracks whether every vendor's monthly invoice has arrived. That is a question for the assistant afterwards ("which vendors have no invoice for August?"), and it answers from what was filed.
- It needed a paid plan. Connecting Gmail and running Historical Sync come with the Max plan on a personal workspace or any Team plan. Workflows on files you upload work on every plan, so the same filing sentence works on a folder of downloaded invoices for free.
How to do this with your own inbox
- Connect Gmail or Outlook to save Gmail attachments and save Outlook attachments going forward. From now on, new attachments can be filed as they arrive by a workflow with the Email Attachment trigger; the full setup is in how to save Gmail attachments to Google Drive automatically.
- Write the filing sentence first, on a workflow that watches new files in the workspace, with "ask me" on the unsure branch.
- Run Historical Sync for the range you need. Let it finish; the panel shows the totals.
- Clear the Approvals queue once. Narrow the asking to the branch that matters afterwards.
- If the destination is Google Drive, OneDrive, SharePoint or Dropbox rather than the workspace, Save a Copy into the connected drive is the first step of the sentence, and the rest is the same.
The general guide to the options, including the free ones, is how to save email attachments to folders. If you want the inbox to organize email attachments automatically from day one and skip the backlog, connect it before the backlog exists. And if the file you need is one you downloaded months ago, find old email attachments is the shorter problem.
Frequently Asked Questions
How many email attachments can Historical Sync import?
The import is bounded by the time range you choose (30, 90 or 180 days, or a year on Outlook) and by your workspace storage, not by a file count. Ours brought in 1,400+ attachments from a long-lived Gmail account. Each account runs one import at a time and can be cancelled.
Does the import file the attachments?
No. Imported attachments land at the top level of the workspace with their original names. A workflow watching new files in the workspace files them, or the assistant organizes the folder as one previewed change.
Can it read scanned invoices and photos of bills?
Scanned PDFs, yes: the vendor, date and amount are read off the page and used in the name and the folder. Image files are skipped by Historical Sync as documented today; scanned PDFs are the safe format for a paper backlog.
What happens to invoices the AI is not sure about?
They wait in Approvals with the planned name and destination shown, and a person approves or rejects each one. Approvals expire after the time you set, three days by default, and an expired file takes the Expired path, so nothing is silently lost.
One inbox, one sentence
If your backlog is mostly one or two kinds of document, as ours was, one sentence files it. Connect the inbox, write the sentence with "ask me" on the unsure branch, run the import, and clear the queue once. Start with your own inbox, or see how file workflows are built first.
Share it with your network
