Skip to content

Login with google account and this app automatically replies to all your unread emails while you are on vacation.

Notifications You must be signed in to change notification settings

Aakash-mishra2/gmail-api-oauth-node-backend-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GMAIL MANAGER APP

This is a full stack app for responding to your gmail mailbox while you are out on vacation.

  1. Check for new emails in a giver user's gmail mailbox. ( Login using Google Account)

  2. App sends a reply automatically to threads threads with no prior replies.

  3. App adds a custom 'Me_On_Vacation' label to email and move email to the label.

  4. repeat sequence of 1-3 in random intervals of 45 to 120 seconds.

Scripts

npm run start_frontend

Runs the frontend server. Open [http://localhost:8000] to view it in your browser.

npm run start_backend

Runs the backend server. Open [http://localhost:5000] to use it in your project.

File Tree

📦BackEnd
 ┣ 📂routes
 ┃ ┗ 📜routes   //main computations and GMAIL API intergration 
 ┗ 📜server     //Backend server file
📦frontEnd
 ┣ 📂views
 ┃ ┗ 📜login.ejs    // layout structure and responsive component.
 ┗ 📜app        //Frontend entry point file.

Libraries and Technologies used

Implementing "Login with Google"

  • I have implemented Point 4 and 5 from these integration docs for google sign in on my app.

  • Callback function handleAuth is used to handle credential responses. Make yours here

  • Read more

Basic Client-Server architecture between Client(Frontend) and Server(Backend)

Improvement scope in this Code

  • Scope to add testing of the app in future.
  • Creating just one application and using files to store and retrieve the credential token is another approach but in large scale application using files with data storage is not preferred for bigger amounts of data.
  • Better error handling of login or authorization errors and inform users on frontend to retry login.
  • Take user input on frontend about what label they want on their replies if needed.
  • User Sign out should be implemented and it must stops setInterval at the backend when trigerred.
  • App backend crashes sometimes in case of large number of unread emails on user account, this should be handled for efficiently.

Author

About

Login with google account and this app automatically replies to all your unread emails while you are on vacation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published