Skip to content

AbeMoe/AI-Email-Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Email Handler

AI-powered email triage app. Connects to your Gmail, pulls your emails, and uses Claude to sort them into categories so you can blast through your inbox.

What it does

  • Logs in via Google OAuth and reads your Gmail
  • Sends emails in batches to Claude (Haiku) which categorizes each one:
    • Respond — real emails from real people that need a reply
    • Leave as read — order confirmations, shipping updates, receipts, alerts
    • Unsubscribe — newsletters, marketing, promo junk
    • Block — phishing, scams, sketchy stuff
  • You can then take action on each email: reply (with an AI-suggested draft), mark as read, unsubscribe, or block the sender
  • Batch actions to nuke a whole category at once
  • Compose new emails from the app

Tech stack

Backend: Node.js, Express, TypeScript, Google APIs, Anthropic SDK

Frontend: React, TypeScript, Vite, Zustand, Tailwind, React Router

Setup

Prerequisites

  • Node.js
  • A Google Cloud project with the Gmail API enabled and OAuth 2.0 credentials (Web application type)
  • An Anthropic API key

Backend

cd backend
npm install

Create a backend/.env file:

PORT=3001
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GOOGLE_REDIRECT_URI=http://localhost:3001/api/auth/callback
FRONTEND_URL=http://localhost:5176
EMAIL_FETCH_COUNT=100
ANTHROPIC_API_KEY=your-anthropic-api-key (You'll need to fund your account otherwise it will go to "Mark as Read")

Also drop your Google OAuth client secret JSON file in the project root (the one you download from Google Cloud Console).

npm run dev

Frontend

cd frontend
npm install
npm run dev

Run it

  1. Start the backend: cd backend && npm run dev (runs on localhost:3001)
  2. Start the frontend: cd frontend && npm run dev (runs on localhost:5176)
  3. Open http://localhost:5176, click login, authorize with Google
  4. Watch it categorize your inbox

How categorization works

Emails are sent to Claude Haiku in batches of 20, with up to 10 batches running concurrently. Progress streams back to the frontend via SSE so you can see it working in real time. If a batch fails it retries up to 2 times.

About

For u/Dunsmuir's Idea on r/ClaudeAI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages