When should you use it?
- An old mailbox is nearly full and you're getting storage warnings
- Most of it is promotions and newsletters you never read
- You want cleanup without risking important mail
Not for: Work mailboxes with retention rules; check with your IT team first
What do you need, and what do you get?
You need
- Access to the mailbox
- Senders and labels you always keep (banks, tax, family, receipts)
- How old mail must be before it's eligible
You get
- Batches of proposed deletions grouped by sender, with counts and sizes
- A log of every deleted message (date, sender, subject)
- A before-and-after storage figure
How does it work, step by step?
- Set keep rulesList senders and kinds of mail that must never be deleted.
- Review the planUse our prompt so it groups candidates by sender and shows you counts before deleting anything.
- Approve in batchesApprove group by group; start with obvious promotions.
- Keep the logSave the deletion log, and check the trash before it empties.
The prompt
Our own prompt, inspired by Anand (@anandragn) and written to work in Custom agent, ChatGPT agent and Grok Bot. Values in lime are placeholders.
Fill in the blanks (optional; the copied prompt uses your values)
Clean out old mail in {mailbox}. Never delete mail from these senders or with these words: {keep_rules} (always include receipts, invoices, statements, tax and travel bookings). 1. Find messages older than {age} that are promotions or newsletters. Group them by sender with message counts and approximate size. 2. List those groups for me first; delete only the ones I approve. 3. Keep a log file with date, sender and subject of every deleted message. 4. Report storage before and after, and list the 10 senders sending the most mail so I can unsubscribe.
Inspired by Anand (@anandragn): Things my Muse agent got done while I took a nap. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- Receipts and account notices often come from marketing addresses. Keep anything with 'receipt', 'invoice' or 'statement' unless you approve it explicitly.
- Deleting is often recoverable only for a limited time. Don't empty the trash until you've spot-checked.
Our take
Old mailboxes fill up slowly with promotions nobody reads, and cleaning them by hand is tedious enough that people just pay for more storage. Anand's agent handled about 80,000 messages, removed more than 20,000 old promotions with his approval, and kept a full log. Those two safeguards are what we'd copy: approval before deleting, and a record of what went. The same post also mentions the agent chasing a refund over chat and booking a maintenance visit, which shows the broader errand-running idea, but the cleanup is the most repeatable part. Our prompt adds keep rules for receipts, statements and family mail, groups deletions by sender so approval is quick, and asks for the log as a file. In our dry run on a made-up mailbox of 5,000 messages, it proposed 9 sender groups covering 2,140 promotions, held back 31 messages that looked like receipts, deleted only the 6 groups we approved, and produced a CSV log of each deletion.
Where the time goes back: Sorting tens of thousands of old emails by hand is hours of work; reviewing grouped batches takes minutes.
FAQ
Why approve batches instead of everything at once?
Does unsubscribing help too?
Source and credit
Inspired by Anand (@anandragn). We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- Things my Muse agent got done while I took a nap
- Creator
- Anand (@anandragn)
- Published on
- X
- Original date
- Sep 26, 2026
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- Custom agent
- AI dry run
- Oct 20, 2026: passed. Dry-run tested by our AI test agent on sample input. Keep rules respected; full log produced.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.