An open-source AI powered email assistant for reducing inbox overload.
NotaBeen is an open-source email assistant that uses AI to help you manage your inbox more efficiently. It helps you quickly summarize emails, generate smart replies, and categorize messages to reduce inbox overload.
- AI-Powered Summarization: Get a quick overview of long emails with AI-generated summaries.
- Automated Categorization: Automatically sort incoming emails into categories like Urgent, Important, Can Wait, Unsubscribe, and Unimportant to prioritize what matters.
- Secure Inbox Management: Manage your email without worrying about your data, as NotaBeen is self-hostable.
- Next.js — Framework
- Material UI — UI Components
- MongoDB — Database
- Better Auth — Authentication
- Google Gemini API — AI Engine
Setup video: https://www.youtube.com/watch?v=HmpXFbpzquU
To run NotaBeen, you need:
- Node.js (>= 18.0.0)
- MongoDB Database
- Google Cloud Project (for OAuth 2.0 Client ID/Secret for Gmail access)
- Google Gemini API Key
git clone https://github.com/NotaBeen/notabeen-ai-email-assistant.git
cd notabeen-ai-email-assistantnpm installCreate a .env.local file in the root directory by copying .env.example:
cp .env.example .env.localThen fill in the following required variables:
# Authentication (Better Auth)
AUTH_SECRET= # Generate with: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
BETTER_AUTH_URL=http://localhost:3000
NEXT_PUBLIC_BETTER_AUTH_URL=http://localhost:3000
# Google OAuth
GOOGLE_CLIENT_ID= # From Google Cloud Console
GOOGLE_CLIENT_SECRET= # From Google Cloud Console
# Database
MONGODB_URI= # Your MongoDB connection string
MONGO_CLIENT=notabeen # Database name
# Email Encryption
ENCRYPTION_KEY= # Generate with: openssl rand -base64 24
ENCRYPTION_IV= # Generate with: openssl rand -base64 9
# AI Engine
GEMINI_API_KEY= # From Google AI Studio-
AUTH_SECRET (Required)
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"This generates a 64-character hex string used for encrypting OAuth tokens.
-
Google OAuth Credentials (Required)
- Go to Google Cloud Console
- Create OAuth 2.0 Client ID (Web application)
- Add authorized redirect URI:
http://localhost:3000/api/auth/callback/google - Enable Gmail API
- Copy Client ID and Client Secret
-
MongoDB Database (Required)
- Use MongoDB Atlas (cloud) or local MongoDB
- Set
MONGODB_URIto your connection string - Set
MONGO_CLIENTto your database name (default:notabeen)
-
Encryption Keys (Required for email security)
# Generate encryption key (32 characters) openssl rand -base64 24 # Generate initialization vector (12 characters) openssl rand -base64 9
-
Google Gemini API Key (Required)
- Get your API key from Google AI Studio
npm run devVisit http://localhost:3000.
Note: Currently, the app only supports Gmail.
We ❤️ contributions big and small:
- Open a PR to fix a bug or add a new feature.
- Submit a feature request or bug report.
- Vote on features or get early access to beta functionality in our roadmap.
This repo is available under the MIT Expat License.

