- Python 3.8 or higher
- Google Cloud Console account
-
Create a Google Cloud Project:
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Gmail API for your project
-
Create OAuth 2.0 Credentials:
- In the Google Cloud Console, go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Choose "Desktop app" as application type
- Download the credentials and save as
credentials.jsonin the project directory
-
Set up environment variables:
GOOGLE_API_KEY=your_api_key_here
-
Install dependencies:
pip install -r requirements.txt
-
Run the script:
python gmail_summarizer.py
The first time you run the script, it will open a browser window for OAuth authentication.