With a new claude subscription, one of the suggested prompts were “Organize my Inbox”. Like a lot of people, I had an inbox that had quietly become an archaeological dig site. Years of promotional emails, shipping notifications, loyalty program spam, and “we miss you” nags had piled up — over a year’s worth of backlog sitting untouched, mixed in with genuinely important mail like bank statements, security alerts, and legal notices. Manually triaging it felt impossible. So I handed the job to an AI agent with Gmail access and let it run, batch after batch, over the course of well over a hundred processing rounds.
Here’s what the process actually looked like, and what I’d tell anyone else considering the same thing.
Statistical Data of Inbox
Here are some interesting facts on my Gmail account I discovered through this process.
- Account Age — created in 2007. Approximately 18 years and 9 months old as of today
- Inbox Total — 132,096 emails, 124,069 Unread. This is also after any cleanups done within the past two decades
- Starred Mail — 33 emails
- Sent Mail — 15,547 emails sent
The organizing scheme
Before touching anything, we agreed on a dead-simple structure: three buckets.
- Promos — pure marketing and promotional email
- Notifications — receipts, shipping updates
- Service Notices — informational but not urgent
- People — actual human correspondence, left alone entirely
Promotional mail older than a year got deleted outright. Notification-type mail got archived (removed from the inbox but kept, just organized under a label) rather than deleted, since receipts and shipping confirmations occasionally matter later.
The non-negotiable safety net
The single most important ground rule was this: nothing gets permanently deleted. “Delete” in this workflow meant moving a thread to Gmail’s Trash folder, which auto-purges after about 30 days. That gave a full month to notice if something got misclassified and pull it back, without me having to review every decision in real time. This is the detail I’d insist on for anyone trying this — never let an agent skip straight to permanent deletion.
There was also a hard list of categories that were never touched, no matter what: anything from a bank, credit card company, or payment processor; legal notices and class-action mail; government correspondence (tax authority notices, customs declarations); genuine account-security alerts and two-factor codes; and a couple of personally important recurring senders (in my case, work-shift notifications from a scheduling platform). Those stayed in the inbox exactly as they were, untouched, full stop.
How the actual sorting worked
The mechanics were pretty unglamorous: search Gmail for old mail in the “promotions” and “updates” categories, pull back a batch (Gmail’s API caps you at 50 results per search), and have the AI read each subject line and sender to decide: trash it, archive it, or leave it alone as protected.
A few things made this harder than it sounds:
The classification rules had to evolve. Early on, the AI treated anything promotional as fair game for deletion — until it noticed that marketing emails from financial institutions (“upgrade your credit card,” “check out our new savings rate”) were slipping into the same bucket as junk mail from random online retailers. That got corrected: anything from a bank or financial institution, promotional or not, became protected. Similarly, a few “protect your account” template emails from a marketplace turned out to be generic recurring nags rather than real security incidents — those got reclassified as safe to archive once the pattern was clear.
Repeat senders needed a growing exclusion list. Since old mail from the same handful of senders (loyalty programs, a particular clothing retailer, a food delivery app) kept resurfacing every round, each pass added newly-confirmed senders to an exclusion filter so they wouldn’t need to be re-judged threads over and over. This turned into a genuinely long running list of a hundred-plus sender domains, split between “definitely fine to auto-clear” and “definitely protected, never touch.”
The backlog composition changed as it emptied. In the early rounds, almost everything found was ordinary junk — easy calls. As the sweep worked backward and then started closing in on more recent mail, the ratio flipped: entire batches would come back 90-100% protected content (payment receipts, login alerts, verification codes), because the genuinely disposable stuff near the front of the queue had already been cleared out in earlier passes. That’s a useful signal in itself — it meant the “easy” work was done and what was left needed a human’s judgment call more than an algorithm’s.
Working in batches, continuously
Rather than asking for approval on every single email, the process ran in large batches — up to 50 emails classified and acted on per pass, moving backward in time from the oldest mail forward, with a quick status update after each round. That pacing mattered: batching kept it moving without requiring a person to sit and click “approve” a hundred times, but it stayed reversible and auditable the whole way because everything trashed sat safely in the recovery window and the classification logic behind each decision could be explained afterward.
What this actually saved
Over the full run, several hundred old promotional threads were cleared out and a comparable number of low-priority notifications got tidied out of the inbox and into an archive label — all without touching a single financial statement, security code, legal notice, or personally important message. The inbox went from an undifferentiated pile spanning years to something where what remains in the primary view is either recent or something that was deliberately protected.
The honest caveats
A few things worth knowing if you’re thinking about doing this yourself:
It’s slow at API-imposed batch limits. Fifty items per search call means a genuinely large backlog takes many, many rounds — this took well over a hundred passes. The AI will make judgment calls you might not fully agree with, especially in gray areas (is a loyalty-program receipt “notification” or “promotional”? Is a shipping company’s account-security email as protected as a bank’s?). Reviewing the classification rules periodically, not just the outcomes, is worth doing. “Deleted” isn’t really deleted for 30 days, which is a feature, not a bug — but it also means older trashed batches quietly become permanently gone as the window rolls forward, so if something needs recovering, that has to happen quickly. The backlog doesn’t stay static. The dataset changes shape as you clear it — expect the mix of “easy junk” versus “needs real judgment” to shift a lot as you get closer to the present day.
After 101 passes and burning half a week of token usage, the progress was not efficient enough to proceed with. The process was slow and tedious with a roadblock of 5-Hour limits. Here are some statistics after the cleanup:
- Inbox Total — 123,501 emails, 115,623 Unread
- Total Mail Cleared — 8,595 emails
- Claude Processing Time — 4 hours and 42 minutes
- Total time — 2 Days
If your inbox looks anything like mine did, letting an agent grind through the boring, repetitive triage — while keeping humans (or hard-coded rules) in charge of anything financial, legal, or security-related — turns an genuinely overwhelming cleanup into something that just quietly happens in the background. A more formulated prompt or process is probably required to efficiently parse through the negligence and sheer laziness of an unorganized mailbox.