Skip to content

Batch-delete gmail messages using Gmail search queries.

License

Notifications You must be signed in to change notification settings

shivsondhi/gmail-cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inbox Cleaner

Delete or trash multiple Gmail messages using Gmail queries.

Example Queries

- subject:Achieve your goals
- in:spam
- before:2019/01/01 is:unread
- label:productivity

Check out more search operators you can use in Gmail queries.

Google App and Credentials

Before running this script you will need to create a project on the Google Cloud Platform and allow it to use the Gmail API. The steps to do that can be found here. You will also need authorization credentials for your desktop application. The steps for that can be found here. While configuring OAuth, you can select External application and create credentials for a Desktop application at the relevant prompts.

After these steps, you should have a JSON file with your client secret and other credentials. Download this file into server/api-access/ and name it credentials.json. The tokens.json file will be generated for you automatically once you sign in using your Gmail account.

Dependencies

After cloning the repository, run the following commands in the server folder:

npm init
npm install googleapis@39 --save 

Preview

About

Batch-delete gmail messages using Gmail search queries.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published