asuka-405 / AutoReply

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project Overview

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.

Files

  • 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.

Dependencies

  • 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.

Usage

  1. Copy .env.example to .env and fill in your Google Cloud and NGrok details.
  2. Install dependencies using yarn install.
  3. Run the development server using yarn dev.

About


Languages

Language:JavaScript 100.0%