Skip to content

Pratish10/Nodejs-Gmail-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nodejs Gmail API

Node.js based app that is able to respond to emails sent to your Gmail mailbox while you’re out on a vacation.

Appendix

  1. Check for new emails in a given Gmail ID.
  2. Send replies to Emails that have no prior replies.
  3. Add a Label to the email and move the email to the label.
  4. Repeat this sequence of steps 1-3 in random intervals of 45 to 120 seconds.

Download all the source code Including Project setup and explanation video from this link - https://drive.google.com/drive/folders/1Cg0Wh_HI2I2geLIa2s5gG8J25lIoq7GU?usp=sharing

Download all the dependencies using npm install.

Follow GCP Setup.mkv video to configure and setup the Gmail API including the credentials.

Follow Project Explanation.mkv video to implement the credentials and token. Remember the access token is valid only for 3599 seconds which is enough.

Place your CLIENT_ID and CLIENT_SECRET in the .env file respectively.

.env

    CLIENT_ID="Your client ID" \
    CLIENT_SECRET="your client secret"
    REDIRECT_URI=https://developers.google.com/oauthplayground

Copy and paste the json data which generated in https://developers.google.com/oauthplayground to authorise your app in the file token.json

token.json

    {
        "access_token": "your access token",
        "scope": "https://mail.gmail.google.com/",
        "token_type": "Bearer",
        "expires_in": 3599,
        "refrsh_token": "your refresh token"
    }

Run the app.js file by using node app.js

This project is an assignment for the role of Nodejs Development Internship for the Listed company.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published