8000 GitHub - Dave-Vermeulen/gmail-inbox-cleaner: Automated Gmail inbox cleaner for processing unread emails
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Dave-Vermeulen/gmail-inbox-cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gmail Inbox Cleaner

A Node.js application that helps clean up your Gmail inbox by automatically processing unread emails containing "unsubscribe" text.

Prerequisites

  • Node.js (v14 or higher)
  • npm
  • Google Cloud Platform account
  • Gmail API enabled
  • OAuth 2.0 credentials

Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/gmail-inbox-cleaner.git
    cd gmail-inbox-cleaner
  2. Install dependencies:

    npm install
  3. Set up Google Cloud Platform:

    • Create a new project in Google Cloud Console
    • Enable Gmail API
    • Create OAuth 2.0 credentials
    • Add authorized redirect URIs:
  4. Save your OAuth credentials:

    • Download the OAuth credentials from Google Cloud Console
    • Save as credentials.json in the project root directory
  5. Start ngrok:

    ngrok http 3000
  6. Update the redirect URI:

    • Copy your ngrok URL
    • Update it in config/auth.js
    • Add it to your OAuth credentials in Google Cloud Console
  7. Run the application:

    node server.js

Usage

  1. Start the server using node server.js
  2. Click the authorization link that appears in the console
  3. Sign in with your Google account and authorize the application
  4. The application will automatically process unread emails

Configuration

Update config/auth.js with your specific settings:

  • REDIRECT_URI: Your ngrok URL or production URL
  • SCOPES: Gmail API scopes needed
  • TOKEN_PATH: Where to store the OAuth token

Development

The project structure is organized as follows:

  • config/: Configuration files
  • utils/: Helper utilities
  • services/: Core service functionality
  • server.js: Main application entry point

Project Structure

gmail-cleaner/
├── config/
│   └── auth.js
├── utils/
│   └── authHelper.js
├── services/
│   └── gmailService.js
├── server.js
├── .gitignore
├── package.json
├── README.md
└── LICENSE

License

MIT License - See LICENSE file for details

About

Automated Gmail inbox cleaner for processing unread emails

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0