"We were drowning in documents. Every week, someone spent 8+ hours just organizing PDFs. So we built an AI system. Results: €33K annual savings, 8 hours → 45 minutes, 92% accuracy. The AI handles 90% of it now."
I Built an MBOX Converter in 30 Minutes with Claude
A client needed to migrate Google Vault email exports to Outlook. The problem: Google exports in MBOX format. Outlook needs EML files. There's no native converter.
Instead of searching for paid tools or complicated scripts, I built one myself. Here's exactly how.
The Problem
Google Vault exports emails as .mbox files—a format from the 1970s that bundles thousands of emails into a single file. Outlook can't read it. Neither can most email clients.
The client had 50,000+ emails to migrate. Manual conversion wasn't an option.
The Solution: 82 Lines of Python
The core converter is embarrassingly simple:
def convert_mbox(mbox_path, output_dir):
mbox = mailbox.mbox(mbox_path)
count = 0
for msg in mbox:
# Create filename from date + sender + subject
filename = f"{date}_{sender}_{subject}.eml"
with open(output_dir / filename, 'wb') as f:
f.write(msg.as_bytes())
count += 1
return count
Python's mailbox module does all the heavy lifting. Each email in the MBOX becomes a separate .eml file that Outlook opens natively.
Making it User-Friendly
A command-line script wouldn't work for a non-technical client. I needed a native Mac app with drag-and-drop support.
Problem: Python's tkinter wasn't available on my system. Solution: AppleScript wrapper calling the Python backend.
-- AppleScript handles GUI set selectedFiles to choose file -- Python does the conversion do shell script "python3 converter_core.py " & quoted form of filePath
Compiled with osacompile, it becomes a proper .app that lives in the Applications folder.
Results
Key Lessons
- Standard libraries are powerful. Python's
mailboxmodule handled all the MBOX parsing—no external dependencies. - AppleScript + Python = native Mac apps. When GUI frameworks don't cooperate, hybrid approaches work.
- Build small, ship fast. The client didn't need a beautiful app. They needed their emails converted today.
The full code is open source. If you're migrating from Google Vault to Outlook, reach out—I'll share the app.