Manage your inbox with plain English. Write one prompt to handle all your emails - categorize, archive, reply, and more.
Email Use lets you write a system prompt that gets applied to every incoming email. Instead of creating complex filters or rules, you describe what you want in natural language:
For each email:
- If it's from my team (@company.com), mark as important
- If it's a newsletter or marketing, archive immediately
- If someone is asking for a meeting, draft a polite reply asking for an agenda
- If it contains an invoice, label as "Finance"
The AI handles the rest - categorizing, archiving, replying, marking as read/unread, and applying labels automatically.
- Plain English rules - Write conditions like you'd explain to an assistant
- Full email actions - Reply, categorize, archive, mark read/unread, apply labels
- Iterate anytime - Refine your prompt as your needs change
- Back-test your rules - Test against past emails before deploying
- Multiple AI providers - Use Claude, GPT-4, or bring your own API keys
- Self-hostable - Run on your own infrastructure, MIT licensed
- Node.js 18+
- A Gmail account
- API key from Anthropic (Claude) or OpenAI (GPT-4)
# Clone the repo
git clone https://github.com/pretzelai/email-use.git
cd email-use
# Install dependencies
bun install
# Set up environment variables
cp .env.example .env
# Edit .env with your API keys and database URL
# Run database migrations
bunx drizzle-kit push
# Start the development server
bun devOpen http://localhost:3000 to get started.
DATABASE_URL= # PostgreSQL connection string
GOOGLE_CLIENT_ID= # Google OAuth client ID
GOOGLE_CLIENT_SECRET= # Google OAuth client secret
ANTHROPIC_API_KEY= # Optional: Anthropic API key for Claude
OPENAI_API_KEY= # Optional: OpenAI API key for GPT-4
- Connect your Gmail - Securely authenticate with Google OAuth
- Write your prompt - Describe how you want emails handled in plain English
- Test it - Back-test against existing emails to verify behavior
- Deploy - Enable the prompt to process incoming emails automatically
Emails are processed in real-time as they arrive. You can view all processed emails and the actions taken in the dashboard.
- Next.js - React framework
- Drizzle ORM - Database ORM
- Better Auth - Authentication
- Tailwind CSS - Styling
MIT