I Had 500,000 Unread Emails. Here’s the Script That Cleared Them Overnight.

แหล่งที่มา Cryptopolitan

By Karnika E. Yashwant (KEY) | Founder, Cryptopolitan & KEY Difference Media

There’s a dirty secret most founders won’t admit: their inbox is a disaster.

Not the polished “inbox zero” screenshot they post on LinkedIn. The real one. The one with 47,000 unread emails they’ve been “meaning to get to” for three years.

Mine had over 500,000.

Half a million threads accumulated across a decade of running multiple companies, managing teams across time zones, and subscribing to every industry newsletter that looked vaguely useful at 2 AM. Every notification from every platform. Every CC’d thread I never asked to be on. Every automated alert from systems I’d long since stopped using.

The inbox wasn’t just cluttered. It was non-functional. Search was slow. Loading took forever. Important emails disappeared into the noise. I’d given up on it as a productivity tool and moved all real communication to Slack, Telegram, and direct calls.

But that’s not a solution. That’s avoidance.

The Problem With Every “Inbox Zero” Method

Every productivity guru sells the same fantasy: process your email daily, archive what’s done, delete what’s irrelevant, and maintain a clean inbox going forward.

That works if you have 200 emails. It doesn’t work if you have 200,000. Or 500,000.

Gmail’s built-in tools can’t handle it. “Select all” only selects conversations on the current page. Filters process new mail, not old. Third-party apps either charge a subscription, require OAuth access you shouldn’t trust, or crash when they hit Gmail’s API rate limits.

Deleting wasn’t an option either. Buried in that half-million were real contracts, important conversations, financial receipts, and correspondence I might need someday. I wanted to archive everything — move it out of the inbox but keep it searchable in All Mail.

So I did what any founder with an AI copilot should do: I built a tool.

The Solution: A Self-Running Google Apps Script

Google Apps Script is free, runs inside your Google account, and has direct access to the Gmail API. The constraints are a 6-minute execution limit per run and a daily quota on Gmail operations. For most automation, neither matters. For archiving 500,000 threads, you need to be clever about both.

The script works like this:

  • Archives 50 threads per batch with a 3-second pause between batches (avoids Gmail’s rate limits)
  • Runs for ~4.5 minutes per cycle, then stops before hitting the 6-minute execution limit
  • Auto-triggers itself every 5 minutes via a time-based trigger
  • Detects Gmail’s daily quota limit automatically — when it hits the cap (~35K–40K threads/day), it pauses the trigger and schedules a resume for the next day
  • Tracks total progress across runs and across days using script properties
  • Self-cleans: removes all triggers and resets the counter when the inbox hits zero
  • Includes a manual stop() function if you want to halt it at any point

Real Numbers From My Inbox

Day one: the script archived 38,950 threads before Gmail’s daily quota kicked in. When it detects the limit, it pauses the trigger and schedules an automatic resume for the next day. No manual intervention needed.

Hitting the daily quota — the script pauses and resumes automatically:

At ~35,000–40,000 threads per day, a 500,000-thread inbox takes about two weeks of fully hands-off operation. Smaller inboxes in the 10K–50K range will clear in a day or two.

Batches running in real time:

Auto-triggering every 5 minutes, no manual intervention:

Why This Matters for Founders

This isn’t really about email. It’s about a mindset shift.

Most founders tolerate broken systems because fixing them feels like a distraction from “real work.” But a cluttered inbox isn’t a minor inconvenience. It’s a compounding tax on your attention. Every time you open Gmail and see that number, it drains a small amount of cognitive energy. Multiply that across months and years.

The script took three minutes to set up. The return was an entire communication channel reclaimed.

More importantly, it’s a template for how founders should think about operational friction. If something is broken and you can automate the fix in under an hour, do it now. Don’t add it to a task list. Don’t wait for a “quiet week.” Build the tool, deploy it, and move on.

I built this with Claude as my copilot. Described the problem, iterated on the approach, tested it live, hit the quota wall, and fixed it — all in one session. That’s the workflow. AI doesn’t replace the founder’s judgment about what to fix. It compresses the time between “this is broken” and “it’s fixed.”

Setup: 3 Minutes, 5 Steps

  1. Go to script.google.com
  2. Create a new project and paste the script
  3. Run the “setup” function
  4. Authorize when Google prompts you
  5. Walk away. It handles daily limits, resumes automatically, and stops when it’s done.

What it looks like in the Google Apps Script editor:

Get the Script

I’m sharing this tool for free. Download the full script at karnikayashwant.com/inbox-zero 

If you’re a Gmail user sitting on tens of thousands — or hundreds of thousands — of unread emails, this will give you a clean start in the time it takes to set it up.

Inbox zero is 3 minutes away.

ข้อจำกัดความรับผิดชอบ: เพื่อการอ้างอิงเท่านั้น ผลการดำเนินงานในอดีตไม่ได้บ่งบอกถึงผลลัพธ์ในอนาคต
placeholder
WTI ร่วงหลังทรัมป์ส่งสัญญาณดำเนินการทางทหารต่อเนื่องกับอิหร่านน้ำมันดิบเวสต์เท็กซัสอินเตอร์มีเดียต (WTI) ดีดตัวขึ้นอย่างรุนแรงในวันพฤหัสบดี ปรับตัวขึ้นมากกว่า 8% ในวันเดียว เนื่องจากความตึงเครียดที่เกิดขึ้นในตะวันออกกลางยังคงทำให้ราคามีพรีเมียมความเสี่ยงทางภูมิรัฐศาสตร์ฝังอยู่ท่ามกลางการหยุดชะงักของอุปทานผ่านช่องแคบฮอร์มุซ
ผู้เขียน  FXStreet
เมื่อวาน 01: 53
น้ำมันดิบเวสต์เท็กซัสอินเตอร์มีเดียต (WTI) ดีดตัวขึ้นอย่างรุนแรงในวันพฤหัสบดี ปรับตัวขึ้นมากกว่า 8% ในวันเดียว เนื่องจากความตึงเครียดที่เกิดขึ้นในตะวันออกกลางยังคงทำให้ราคามีพรีเมียมความเสี่ยงทางภูมิรัฐศาสตร์ฝังอยู่ท่ามกลางการหยุดชะงักของอุปทานผ่านช่องแคบฮอร์มุซ
placeholder
ทองคำร่วงต่ำกว่า 4,700 ดอลลาร์ก่อนการประกาศ NFP ของสหรัฐฯในช่วงเช้าของตลาดลงทุนเอเชียวันศุกร์ ราคาทองคํา (XAUUSD) เผชิญแรงกดดันจากการขาย ปรับตัวลดลงมาวิ่งใกล้ $4,675 โลหะมีค่าปรับตัวลดลงเนื่องจากความคิดเห็นของประธานาธิบดีสหรัฐฯ โดนัลด์ ทรัมป์ เกี่ยวกับสงครามกับอิหร่านทําให้ราคาน้ำมันพุ่งขึ้น กิจกรรมการซื้อขายยังคงเงียบเนื่องจากวันศุกร์ดี
ผู้เขียน  FXStreet
เมื่อวาน 02: 34
ในช่วงเช้าของตลาดลงทุนเอเชียวันศุกร์ ราคาทองคํา (XAUUSD) เผชิญแรงกดดันจากการขาย ปรับตัวลดลงมาวิ่งใกล้ $4,675 โลหะมีค่าปรับตัวลดลงเนื่องจากความคิดเห็นของประธานาธิบดีสหรัฐฯ โดนัลด์ ทรัมป์ เกี่ยวกับสงครามกับอิหร่านทําให้ราคาน้ำมันพุ่งขึ้น กิจกรรมการซื้อขายยังคงเงียบเนื่องจากวันศุกร์ดี
placeholder
EUR/USD ปรับตัวขึ้นเล็กน้อยเข้าใกล้ระดับ 1.1550 นักลงทุนเตรียมพร้อมรับข้อมูล NFP สหรัฐฯในช่วงเช้าของตลาดลงทุนเอเชียวันศุกร์ คู่ EURUSD ขยับขึ้นเล็กน้อยที่ประมาณ 1.1540 ปริมาณการซื้อขายน่าจะบางเนื่องจากวันหยุด Good Friday รายงานการจ้างงานนอกภาคเกษตร (NFP) ของสหรัฐฯ ประจำเดือนมีนาคมจะเป็นจุดสนใจหลักในช่วงบ่ายวันศุกร์
ผู้เขียน  FXStreet
เมื่อวาน 06: 21
ในช่วงเช้าของตลาดลงทุนเอเชียวันศุกร์ คู่ EURUSD ขยับขึ้นเล็กน้อยที่ประมาณ 1.1540 ปริมาณการซื้อขายน่าจะบางเนื่องจากวันหยุด Good Friday รายงานการจ้างงานนอกภาคเกษตร (NFP) ของสหรัฐฯ ประจำเดือนมีนาคมจะเป็นจุดสนใจหลักในช่วงบ่ายวันศุกร์
placeholder
น้ำมันฉุดทองคำร่วง รอลุ้นตัวเลขจ้างงานสหรัฐฯ หุ้นไทยระวังเทขายก่อนหยุดยาว!ทันทุกกระแสการเงิน สรุปข่าวเด่น Forex หุ้น ทองคำ คริปโตฯ และเศรษฐกิจรอบวัน วิเคราะห์แนวโน้มตลาดด้วยข้อมูลเชิงลึก อ่านง่าย เข้าใจไว อัปเดตล่าสุดที่นี่
ผู้เขียน  Mitrade
เมื่อวาน 07: 17
ทันทุกกระแสการเงิน สรุปข่าวเด่น Forex หุ้น ทองคำ คริปโตฯ และเศรษฐกิจรอบวัน วิเคราะห์แนวโน้มตลาดด้วยข้อมูลเชิงลึก อ่านง่าย เข้าใจไว อัปเดตล่าสุดที่นี่
placeholder
การคาดการณ์ราคา GBPUSD: การรีบาวด์ขึ้นสู่ระดับ 1.3250 ใกล้เส้นค่าเฉลี่ยเคลื่อนที่ 9 วันในช่วงชั่วโมงการซื้อขายของเอเชียวันศุกร์ คู่ GBP/USD ยืนอยู่ในแดนบวกที่บริเวณ 1.3230 หลังจากที่เมื่อวันก่อนหน้านี้ปรับตัวลดลงมากกว่า 0.5% การวิเคราะห์ทางเทคนิคจากกราฟรายวันชี้ให้เห็นแนวโน้มขาลงอย่างต่อเนื่อง เนื่องจากคู่สกุลเงินยังคงเคลื่อนตัวอยู่ภายในรูปแบบกรอบราคาขาลง
ผู้เขียน  FXStreet
เมื่อวาน 08: 48
ในช่วงชั่วโมงการซื้อขายของเอเชียวันศุกร์ คู่ GBP/USD ยืนอยู่ในแดนบวกที่บริเวณ 1.3230 หลังจากที่เมื่อวันก่อนหน้านี้ปรับตัวลดลงมากกว่า 0.5% การวิเคราะห์ทางเทคนิคจากกราฟรายวันชี้ให้เห็นแนวโน้มขาลงอย่างต่อเนื่อง เนื่องจากคู่สกุลเงินยังคงเคลื่อนตัวอยู่ภายในรูปแบบกรอบราคาขาลง
goTop
quote