{"id":17552598,"url":"https://github.com/iloveitaly/gmail-digest","last_synced_at":"2026-02-26T03:47:17.393Z","repository":{"id":250171604,"uuid":"833624703","full_name":"iloveitaly/gmail-digest","owner":"iloveitaly","description":"A tool to generate a daily digest of your Gmail inbox. Helpful if you have agents working on your behalf.","archived":false,"fork":false,"pushed_at":"2025-03-02T13:01:12.000Z","size":302,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T12:58:18.538Z","etag":null,"topics":["ai","digest","email","gmail","gmail-api","llm"],"latest_commit_sha":null,"homepage":"https://github.com/iloveitaly/gmail-digest","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iloveitaly.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["iloveitaly"]}},"created_at":"2024-07-25T12:27:19.000Z","updated_at":"2025-03-02T13:01:15.000Z","dependencies_parsed_at":"2024-08-02T13:31:35.767Z","dependency_job_id":"876f1d1b-7e2c-48c0-b5b6-43ee4ee2eb73","html_url":"https://github.com/iloveitaly/gmail-digest","commit_stats":null,"previous_names":["iloveitaly/gmail-digest"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iloveitaly%2Fgmail-digest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iloveitaly%2Fgmail-digest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iloveitaly%2Fgmail-digest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iloveitaly%2Fgmail-digest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iloveitaly","download_url":"https://codeload.github.com/iloveitaly/gmail-digest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250545623,"owners_count":21448240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","digest","email","gmail","gmail-api","llm"],"created_at":"2024-10-21T05:43:17.800Z","updated_at":"2026-02-26T03:47:12.367Z","avatar_url":"https://github.com/iloveitaly.png","language":"Python","funding_links":["https://github.com/sponsors/iloveitaly"],"categories":[],"sub_categories":[],"readme":"# Gmail Digest\n\nIf you have an assistant (real or AI) working in your inbox, it's helpful to know what they are doing. This tool generates a summary of the emails sent from your inbox each day.\n\nAlternatively, this could be used to monitor a support inbox, sales inbox, etc and understand what is happening across that inbox.\n\n## Installation\n\n```shell\npip install -U gmail-digest\n```\n\n## Usage\n\n```shell\nUsage: gmail-digest [OPTIONS]\n\nOptions:\n  --dry-run  Run script without creating sending\n  --help     Show this message and exit.\n```\n\n### Docker\n\nCheck out the [docker-compose.yml file](./docker-compose.yml) for an example of how to run this tool in a docker container.\n\n```\nghcr.io/iloveitaly/gmail-digest\n```\n\n### Extra filter\n\nYou can customize the gmail query used to collect emails to summarize:\n\n```shell\nGMAIL_FILTER_SUFFIX='-to:personal@gmail.com -to:readwise.io -to:todoist.com'\n```\n\n## Development\n\nTest the tool by running it locally and increasing `DIGEST_DAYS`.\n\nNeed to debug OpenAI/prompt issues? [Enable debug logging.](https://stackoverflow.com/questions/76256249/logging-in-the-open-ai-python-library/78214464#78214464)\n\n## Setup\n\nYou 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).\n\n### Generating a Gmail API Token\n\n1. Navigate to the Google Cloud Console. https://console.developers.google.com/\n2. Create a new project or select an existing one.\n3. Go to \"APIs \u0026 Services\" -\u003e \"Library\" and enable the Gmail API.\n4. Navigate to \"APIs \u0026 Services\" -\u003e \"Credentials\".\n5. Click \"Create Credentials\" -\u003e \"OAuth client ID\".\n6. Select \"Desktop app\" as the application type, then click \"Create\".\n7. Download the JSON file, rename it to `credentials.json`, and place it in the root of this project.\n8. Run the script and oauth into your account\n\nIf you want to edit scopes on an existing application, you can:\n\n1. OAuth Consent Screen\n2. Edit\n3. Continue to step 2\n4. Add or remove scopes\n5. Add scopes and save\n\n#### Credential Scopes Needed\n\nTwo main scopes are required for this:\n\n* `https://www.googleapis.com/auth/gmail.compose`\n* `https://www.googleapis.com/auth/gmail.readonly`\n\nSome other scopes I'd add so you can reuse the credentials in other projects, [like gmailctl](https://github.com/mbrt/gmailctl) or calendar scripts:\n\n* `https://www.googleapis.com/auth/calendar.readonly`\n* `https://www.googleapis.com/auth/calendar.event`\n* `https://www.googleapis.com/auth/gmail.labels`\n* `https://www.googleapis.com/auth/gmail.settings.basic`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filoveitaly%2Fgmail-digest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filoveitaly%2Fgmail-digest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filoveitaly%2Fgmail-digest/lists"}