A tool to generate a daily digest of your Gmail inbox. Helpful if you have agents working on your behalf.
Project description
Gmail Digest
Installation
pip install -U gmail-digest
Usage
Usage: gmail-digest [OPTIONS]
Options:
--dry-run Run script without creating sending
--help Show this message and exit.
Development
Test the tool by running it locally and increasing DIGEST_DAYS
.
Need to debug OpenAI/prompt issues? Enable debug logging.
Setup
You need to create a "OAuth 2.0 Client IDs" which has to be done with a Google Workspace (gsuite). This will not work on a personal gmail account (unless you create a app on a workspace and add your personal account as a test account).
Generating a Gmail API Token
- Navigate to the Google Cloud Console. https://console.developers.google.com/
- Create a new project or select an existing one.
- Go to "APIs & Services" -> "Library" and enable the Gmail API.
- Navigate to "APIs & Services" -> "Credentials".
- Click "Create Credentials" -> "OAuth client ID".
- Select "Desktop app" as the application type, then click "Create".
- Download the JSON file, rename it to
credentials.json
, and place it in the root of this project. - Run the script and oauth into your account
If you want to edit scopes on an existing application, you can:
- OAuth Consent Screen
- Edit
- Continue to step 2
- Add or remove scopes
- Add scopes and save
Credential Scopes Needed
Two main scopes are required for this:
https://www.googleapis.com/auth/gmail.compose
https://www.googleapis.com/auth/gmail.readonly
Some other scopes I'd add so you can reuse the credentials in other projects, like gmailctl or calendar scripts:
https://www.googleapis.com/auth/calendar.readonly
https://www.googleapis.com/auth/calendar.event
https://www.googleapis.com/auth/gmail.labels
https://www.googleapis.com/auth/gmail.settings.basic
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for gmail_digest-1.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a113c053b432341ff8e44593e8bf556e568b37a5aeb775161cfb627bf9fa1993 |
|
MD5 | 9a4b102eb0c87aa6d3a65e650ace6e2e |
|
BLAKE2b-256 | f3cfa9fef860c64a0c58440dbacaec782357faaaaaf05488ec009d96461edcc6 |