inbox_cleaner  by isafulf

Python script for Gmail inbox management

created 1 year ago
445 stars

Top 68.5% on sourcepulse

GitHubView on GitHub
Project Summary

This Python script automates Gmail inbox management by filtering promotional emails using OpenAI's GPT-3 or GPT-4 models. It's designed for users with large Gmail inboxes overwhelmed by promotional content, offering a way to declutter and focus on important messages.

How It Works

The script fetches unread emails from a Gmail account via the Gmail API. For each email, it sends the subject and a snippet of the body to an OpenAI model, prompting it to classify the email as promotional or not. Based on the model's response, it can then apply labels or archive the emails.

Quick Start & Requirements

  • Install: pip install -r requirements.txt
  • Prerequisites: Python 3.7+, Gmail account, Google Cloud account with Gmail API enabled, OpenAI API key.
  • Setup: Requires credentials.json (Google API credentials) and OPENAI_API_KEY environment variable.
  • Usage: python process_all_unread_emails.py
  • Documentation: Gmail API, OpenAI API

Highlighted Details

  • Leverages GPT-3 or GPT-4 for intelligent email classification.
  • Automates filtering of promotional emails.
  • Operates on unread emails within the Gmail inbox.

Maintenance & Community

No specific community channels or roadmap are mentioned in the README. The project appears to be a single-author script.

Licensing & Compatibility

The README does not specify a license. This may imply a default "all rights reserved" or an unstated permissive license. Compatibility for commercial use or closed-source linking is undetermined without a license.

Limitations & Caveats

The script requires significant setup involving Google Cloud and OpenAI API credentials. It processes only unread emails and does not specify error handling for API rate limits or classification failures. The lack of a specified license poses a risk for commercial adoption.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
10 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.