This project is an automated email reply system leveraging the Gmail API. It includes several key files responsible for OAuth2 authentication, Gmail interaction, SSL setup, and the main server.
- Entry point for the application.
- Sets up an Express server with HTTPS.
- Defines routes for Google Single Sign-On (SSO).
- Periodically checks for unread emails and sends automated replies.
- Manages interactions with the Gmail API.
- Includes functions for replying to unread emails, moving emails to custom labels, and checking for new mails.
- Handles OAuth2 authentication using the Google API client library.
- Generates authorization URLs and retrieves OAuth2 clients from tokens.
- Defines the OAuth2 scopes required for Gmail API access.
- Manages SSL key and certificate retrieval for secure server setup.
- Example configuration file with environment variable placeholders.
- Project configuration file with dependencies and scripts.
- Express: Web framework for handling HTTP requests.
- googleapis: Google API client library.
- dotenv: Module for loading environment variables.
- nodemon: Development utility for automatic server restarts.
- Copy
.env.example
to.env
and fill in your Google Cloud and NGrok details. - Install dependencies using
yarn install
. - Run the development server using
yarn dev
.