A web app to visualize email overload from Mailbox.
- Upload CSV via click or drag/drop
- Direct Gmail connect (Google OAuth + Gmail API metadata read)
- Email hit heatmap (day x hour)
- Top senders list (
who wastes most time) - Email type pie chart (category detection)
- Export each chart as PNG
- Export each chart to PDF (print-to-PDF)
- Sample data loader for instant preview
- Copy env template:
cp .env.example .env- Fill
GOOGLE_CLIENT_IDandGOOGLE_API_KEYin.env. - Start local server:
node server.js- Open
http://localhost:5500.
- In Google Cloud Console, enable
Gmail API. - Create OAuth client credentials for a web app.
- Add these exact origins in authorized JavaScript origins:
http://localhost:5500http://127.0.0.1:5500(if you ever run on 127.0.0.1)https://(for Netlify deploys).netlify.appfy.app https://(for Vercel deploys).vercel.appel.app
- Create an API key and restrict it to Gmail API.
- Set
GOOGLE_CLIENT_IDandGOOGLE_API_KEYin.env. - Click
Connect Google Inboxin the app.
Important:
- For this browser-based flow, the critical setting is Authorized JavaScript origins.
Authorized redirect URIsis not used by this token flow and can be left empty.
Notes:
- Scope used:
https://www.googleapis.com/auth/gmail.readonly - Current client fetches up to 500 inbox messages from the last 365 days.
Use headers that include:
DateFromSubject
Synthetic files (no real user data) are included for testing:
/sample-data/sample-email-small.csv/sample-data/sample-email-workload.csv/sample-data/sample-email-mixed.csv
Example:
Date,From,Subject
2026-02-01 09:15:00,[email protected],Deployment alert
2026-02-01 10:31:00,[email protected],Meeting moved to 2PM- Open Google Takeout and choose only
Mail. - Create export and download the archive.
- Extract the archive; Gmail data is usually in
.mboxformat. - Convert
.mboxto CSV using a converter/script so output hasDate,From,Subject. - Upload the CSV in this app.
- Click
Export PNGon any chart card for an image file. - Click
Export PDFto open print preview and save as PDF.
As we are using free tier hosting, input mails are fixed to 500 mails max.
This repo includes a Netlify Function that serves /config.js from Netlify environment variables.
- In Netlify project settings, add:
GOOGLE_CLIENT_IDGOOGLE_API_KEY
- Deploy the repo as-is (the
netlify.tomlis already configured). - Make sure your Google OAuth authorized JavaScript origins includes your Netlify domain.
This repo includes a Vercel API function (api/config.js) and rewrite (vercel.json) so /config.js is served from Vercel environment variables.
- In Vercel project settings, add:
GOOGLE_CLIENT_IDGOOGLE_API_KEY
- Redeploy the project after adding/updating env vars.
- Verify config endpoint:
https://.vercel.app/config.jsfig.js
- Make sure your Google OAuth authorized JavaScript origins includes your Vercel domain.