Note: The web service is deployed on Render as a Node.js web-service. However, please note that the assoiciated GCP project is currently not verified by Google. To Login and test the vacation responder, you may need to contact the developer and add your email to the developer list. Explore the Vacation Responder Demo by visiting the demo link below.
Vacation-Responder is an intelligent Node.js-based command-line application designed to ensure seamless email communication while users are away. Leveraging the prowers of Google's Gmail API and the advanced Google Gemini (Pro) Large Language Model, this tool orchestrates seamless correspondence by actively monitoring incoming emails. With an intuitive approach, it adeptly identifies first-time threads and crafts intelligent responses, or Smart-replies, all while preserving the meticulous organization of the inbox.
A go-to solution for professionals seeking a seamless, organized, and automated approach to manage their email correspondence during their absence, providing peace of mind and professionalism in communication.
Usage: pnpm run server
This will start a server on http://localhost:3000
Usage: pnpm run cli [command]
VacationResponder - An automated email response and thread management tool.
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
status Outputs the currently logged-in Google account
logout Logs out the current user
login Opens a browser window to OAuth Google account
scheduler Starts the task scheduler, executed at random intervals (ranging from 45 to 120 seconds)
- Node.js 10+
- pnpm or yarn or npm
- credentials.json file in the project directory. (Download from your Google Cloud Project console. Learn more)
-
Clone this repository:
git clone https://github.com/vishalx360/vacation-responder.git
-
Navigate to the project directory:
cd vacation-responder
-
Install Dependencies:
Choose your preferred package manager (pnpm, yarn, or npm) and run:
pnpm install
Note: You can use any package manager such as npm, yarn, or pnpm.
-
Run CLI:
pnpm run cli [command]
-
Run CLI in Watch Mode:
pnpm run cli:watch
-
Run Server:
pnpm run server
-
Run Server in Watch Mode:
pnpm run server:watch
-
Add testing : Currently the program does not have any tests. This can be improved by adding unit tests and integration tests.
-
Better Type Definitions : Currently the program uses the any type in many places. This can be improved by adding better type definitions.
-
HTML Email Response : Currently the program sends a plain text email response. This can be improved by sending an HTML email response.
-
Add Pagination : Currently the program fetches 200 emails max per API call. 100 is the default value for maxResults and can be expanded to 500.But This number can be further improved by using the nextPageToken and resultSizeEstimate provided by the API call to fetch the next batch of emails.
-
Add more features : Currently the program only sends a vacation response. This can be improved by adding more features such as email forwarding, email filtering, etc.
-
- The Google AI JavaScript SDK enables developers to use Google's state-of-the-art generative AI models (like Gemini) to build AI-powered features and applications.
-
- Provides local authentication with Google Cloud for local services.
-
- A framework enabling command-line interface (CLI) creation within applications.
-
- Official Google API client library facilitating interaction with various Google services and APIs.
-
- Implements JSON Web Tokens (JWT) for authentication and token-based security.
-
- A robust Redis client library for Node.js, providing an interface to interact with Redis servers.
-
- A fast, unopinionated, minimalist web framework for Node.js, used to build the server-side application.
-
- Simple session middleware for Express, used for managing user sessions.
-
- Redis session store for Express, enabling session management using Redis.
-
- Lightweight cookie-based session middleware for Express, used for managing session data.
-
- A zero-dependency module that loads environment variables from a .env file, enhancing configuration management.
-
- HTTP request logger middleware for Node.js, providing information about incoming requests.
-
- Typed superset of JavaScript, enhancing code quality with static typing and modern ECMAScript features.
-
- Utility monitoring application changes and automatically restarting the server during development.
-
- Provides TypeScript type definitions for the jsonwebtoken package.
-
- Offers TypeScript support for Node.js-related features and APIs.
-
@typescript-eslint/eslint-plugin
- ESLint plugin providing TypeScript-specific linting rules.
-
- Parser for TypeScript in ESLint for linting TypeScript code.
-
- Pluggable JavaScript and TypeScript linter ensuring code quality and standards.
-
- ESLint configuration to integrate with Prettier and maintain consistent code style.
-
- ESLint plugin enabling code formatting using Prettier.
-
- Opinionated code formatter ensuring consistent code style across the project.