GmailLoader is a web application designed to fetch and classify emails from a user's Gmail account using Google's Gmail API and OpenAI's classification capabilities. This application aims to provide a seamless way to manage and categorize emails based on their content and importance.
- Google OAuth Integration: Securely authenticate users with their Google account to access their Gmail.
- Fetch Emails: Retrieve emails from the user's Gmail account using Gmail API.
- Email Classification: Classify emails using OpenAI's API into categories such as important, social, promotions, etc.
- Real-time Updates: Automatically fetch and classify new emails.
- User Dashboard: Provide users with a dashboard to view and manage their classified emails.
- Responsive Design: Optimized for both desktop and mobile devices.
- Email Organization: Automatically categorize and organize emails to reduce inbox clutter.
- Priority Management: Identify and prioritize important emails, ensuring critical messages are not missed.
- Spam Detection: Classify and separate spam or promotional emails from the main inbox.
- Email Summarization: Provide quick snippets of emails for easy preview and decision-making.
- User Engagement: Improve user engagement by providing a clean and organized email interface.
- Node.js and npm installed.
- Google Cloud project with Gmail API enabled.
- OpenAI API key.
-
Clone the repository:
git clone https://github.com/manlikeNacho/gmailLoader.git
cd gmailLoader
-
Install dependencies:
npm install
3. Environment Variables:
Create a .env file in the root directory and add the following:
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-nextauth-secret (openssl key)
EXPRESS_SESSION_SECRET=secret
GOOGLE_CLIENT_CALLBACK_URI=your-callbackUri-from-google-console
JWT_PRIVATE_KEY=jwt-key
WINSTON_LOG_LEVEL=info
- Run the development server:
npm run dev
- Sign In:
Click on the sign-in button and authenticate using your Google account. 2. Fetch Emails:
Once authenticated, the application will automatically fetch and display emails from your Gmail account. 3. Classify Emails:
Click on the "Classify" button to categorize emails. The classification results will be displayed alongside each email. 4. View Classified Emails:
View and manage classified emails from the user dashboard.
We welcome contributions to enhance GmailLoader. Please fork the repository and submit pull requests for any features or bug fixes.
The fullstack app files(client&Server) can be found in the default branch.