AI-powered CLI tool to identify and automatically unsubscribe from marketing emails in Gmail. Uses LLMs (Gemini, Claude, OpenAI) and browser automation to clean up inboxes. Benefits marketing teams by reducing email clutter and improving productivity.
git clone https://github.com/zbowling/gmail-ai-unsub.gitGmail AI Unsubscribe is a command-line tool that leverages large language models to automatically identify and remove you from marketing email lists. It integrates with Gmail API to scan your inbox, classify emails as marketing or promotional content, and handle unsubscription through multiple methods including RFC 8058 one-click unsubscribe, mailto links, and browser automation for complex unsubscribe pages. The tool supports Gemini, Claude, and OpenAI models with fully customizable classification prompts, giving you control over what gets identified as marketing mail. It tracks unsubscribe attempts and results, helping teams maintain clean inboxes and improve email productivity without manual intervention.
Create a Google Cloud OAuth app and download credentials.json (one-time 10-minute setup). Run `gmail-unsub setup` to configure your LLM provider and Gmail authentication. Scan your inbox with `gmail-unsub scan --days 30`, review labeled emails in Gmail, then execute unsubscriptions with `gmail-unsub unsubscribe`.
Bulk unsubscribe from marketing emails accumulated in Gmail inbox over weeks or months
Reduce email clutter and improve team productivity by automating marketing email removal
Review labeled marketing emails in Gmail before batch unsubscribing with AI classification
Handle unsubscribe pages that require browser interaction or complex HTTP requests
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/zbowling/gmail-ai-unsubCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
I want to use the Gmail AI Unsubscribe Tool to clean up my inbox. I receive a lot of marketing emails from [COMPANY] in the [INDUSTRY] sector. Can you guide me through the process of setting up and running this tool to automatically unsubscribe from these emails?
# Gmail AI Unsubscribe Tool Setup Guide ## Prerequisites - Python 3.8 or higher - Google Chrome or Chromium browser - A Google account with access to Gmail ## Installation 1. Clone the repository: ```bash git clone https://github.com/yourusername/gmail-ai-unsubscribe.git ``` 2. Install the required dependencies: ```bash pip install -r requirements.txt ``` ## Configuration 1. Open the `config.json` file and enter your Google account credentials. 2. Specify the LLM you want to use (Gemini, Claude, or OpenAI). 3. Set the frequency of the unsubscribe checks (daily, weekly, or monthly). ## Running the Tool 1. Execute the script: ```bash python main.py ``` 2. The tool will scan your inbox for marketing emails and present a list of senders. 3. Confirm the senders you want to unsubscribe from. 4. The tool will automatically unsubscribe you from the selected senders. ## Expected Output - A list of marketing email senders identified in your inbox. - Confirmation of successful unsubscription from selected senders. - A log of all actions performed by the tool.
Gmail is a free email service for professional communication and collaboration
Framework for building applications with LLMs
Automate your browser workflows effortlessly
Spreadsheet with built-in API integrations and automation
AI assistant built for thoughtful, nuanced conversation
Pioneering accessible, high-performance AI models
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan