This project aims to automate email processing and replies using Google's Generative AI and Gmail APIs. By leveraging AI, the system can understand the context of received emails and assign automatic labels. It then generates appropriate replies based on the content of the emails one at a time.
Before running the application, make sure you have the following:
- Node.js installed on your machine
- Google Cloud Platform project with the Gmail API enabled
- Google API credentials in JSON format
- A valid API key for Google's Generative AI
- Clone the repository:
- Install dependencies:
- Set up environment variables:
git clone <repository_url>
npm install
Create a .env
file in the project root directory and add the following:
GEMINI_API_KEY=<your_google_api_key>
Replace <your_google_api_key>
with your actual Google API key.
To start the server, run:
npm start
/login
: Redirects to Google login consent screen for OAuth2 authentication./auth/google/callback
: Handles Google's redirect after user login./emails
: Fetches emails, processes them using AI, and sends automated replies.
Contributions are welcome! Please read the contributing guidelines before getting started.
This project is licensed under the MIT License.