Automatically process and archive emails based on custom rules using GPT.
main.py
- Main script.env
- Environment variablescredentials.json
- Gmail API credentials (obtain from Google Cloud Console)requirements.txt
- Python dependencies
OPENAI_API_KEY=your_openai_api_key
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_anon_key
- Install dependencies:
pip install -r requirements.txt
- Set up
.env
file with required credentials - Place
credentials.json
in root directory
- One-time Scan Mode:
python main.py
Processes up to 10 most recent emails once and exits.
- Live Mode:
python main.py --live
Continuously monitors inbox every 10 seconds for new unread emails from last 24 hours.