{"id":16446172,"url":"https://github.com/chriskyfung/gmail-regex-cleaner-apps-script","last_synced_at":"2026-04-02T19:36:24.768Z","repository":{"id":216159998,"uuid":"740554273","full_name":"chriskyfung/gmail-regex-cleaner-apps-script","owner":"chriskyfung","description":"A Google Apps Script that helps you delete Gmail messages older than n days that match your custom regex filters","archived":false,"fork":false,"pushed_at":"2026-03-31T04:32:10.000Z","size":757,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-31T05:47:43.695Z","etag":null,"topics":["gmail","google-apps-script","mail-filter","mail-remove"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chriskyfung.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"buy_me_a_coffee":"chriskyfung","github":"chriskyfung"}},"created_at":"2024-01-08T15:26:54.000Z","updated_at":"2026-03-31T04:31:51.000Z","dependencies_parsed_at":"2024-01-08T19:14:54.447Z","dependency_job_id":"8f66e629-269c-4db6-aac1-6aebc038ba1b","html_url":"https://github.com/chriskyfung/gmail-regex-cleaner-apps-script","commit_stats":null,"previous_names":["chriskyfung/gmail-regex-cleaner-apps-script"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/chriskyfung/gmail-regex-cleaner-apps-script","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriskyfung%2Fgmail-regex-cleaner-apps-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriskyfung%2Fgmail-regex-cleaner-apps-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriskyfung%2Fgmail-regex-cleaner-apps-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriskyfung%2Fgmail-regex-cleaner-apps-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chriskyfung","download_url":"https://codeload.github.com/chriskyfung/gmail-regex-cleaner-apps-script/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriskyfung%2Fgmail-regex-cleaner-apps-script/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31314380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["gmail","google-apps-script","mail-filter","mail-remove"],"created_at":"2024-10-11T09:46:42.335Z","updated_at":"2026-04-02T19:36:24.739Z","avatar_url":"https://github.com/chriskyfung.png","language":"JavaScript","funding_links":["https://buymeacoffee.com/chriskyfung","https://github.com/sponsors/chriskyfung","https://www.buymeacoffee.com/chriskyfung"],"categories":[],"sub_categories":[],"readme":"# Gmail Regex Cleaner\n\n[![clasp](https://img.shields.io/badge/built%20with-clasp-4285f4.svg)](https://github.com/google/clasp)\n[![Build Status](https://github.com/chriskyfung/gmail-regex-cleaner-apps-script/actions/workflows/ci.yml/badge.svg)](https://github.com/chriskyfung/gmail-regex-cleaner-apps-script/actions/workflows/ci.yml)\n[![CodeQL](https://github.com/chriskyfung/gmail-regex-cleaner-apps-script/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/chriskyfung/gmail-regex-cleaner-apps-script/actions/workflows/github-code-scanning/codeql)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](/LICENSE)\n[![GitHub Sponsors Default](https://img.shields.io/badge/Sponsor-GitHub-blue?logo=github-sponsors\u0026colorA=263238\u0026colorB=EC407A)](https://github.com/sponsors/chriskyfung \"Sponsor on GitHub\")\n[![Buy Me A Coffee](https://img.shields.io/badge/Support-Coffee-ffdd00?logo=buy-me-a-coffee\u0026logoColor=ffdd00\u0026colorA=263238)](https://www.buymeacoffee.com/chriskyfung \"Support Coffee\")\n\nA Google Apps Script that helps you delete old emails in Gmail that match your custom regex filters. This can help you save space and keep your inbox organized.\n\n## Table of Contents\n\n* [About The Project](#about-the-project)\n* [Getting Started](#getting-started)\n* [Usage](#usage)\n* [Development](#development)\n* [Contributing](#contributing)\n* [License](#license)\n* [Disclaimer](#disclaimer)\n\n## About The Project\n\nThis project provides a flexible way to automatically clean up your Gmail inbox by deleting old emails that match specific criteria defined by regular expressions. It's perfect for managing recurring emails like newsletters, notifications, and alerts that you don't need to keep forever.\n\n### ✨ Features\n\n* Delete old emails in Gmail that match a regular expression\n* Specify the number of days to keep the emails\n* Exclude starred, important, or labeled emails from deletion\n* Run the script manually or on a schedule\n* Log the deleted emails and errors\n\n## 🚀 Getting Started\n\n\u003e [!WARNING]\n\u003e This script will delete your emails permanently, without moving them to the trash. Please use it with caution and make sure you have a backup of your important emails. You can run the script with the `isDryRun` option set to `true` first to see what emails will be deleted.\n\nThis section will guide you through the process of setting up and running the script.\n\n### 📋 1. Prerequisites\n\n* A Google account with access to Gmail and Google Drive.\n\n### 📦 2. Installation\n\n1. Create a new Google Apps Script project in Google Drive.\n2. Copy and paste the code from `dist/code.js` and `dist/examples.js` into the script editor.\n3. From the `examples.js` file, choose a function that matches your needs, or create a new one. You can then run this function from the Apps Script editor.\n\n    For example, to run one of the pre-made functions, you would select it in the editor's function list and click **Run**.\n\n\u003e [!IMPORTANT]\n\u003e When running the script for the first time, you may need to authorize it to access your Gmail account.\n\n1. Optionally, set up a trigger to run a function periodically. You can do this by clicking the **Triggers** icon in the left sidebar, then clicking the **Add a trigger** button, and choosing the options you want. For example, you can set the script to run every day, week, or month.\n\n### 💻 3. Usage\n\nFor detailed instructions on how to set up and use this script, please see the [**Usage Guide**](./docs/usage.md).\n\n## 👨‍💻 Development\n\nThis project uses ESLint for linting, Prettier for formatting, Jest for testing, and Rollup for building. For more details on the development setup and build process, please see the [**Development Guide**](./docs/development.md).\n\n## 🤝 Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\nPlease read the [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) before contributing.\n\nIf you have a bug report or a feature request, please open an issue on the [GitHub Issues page](https://github.com/chriskyfung/gmail-regex-cleaner-apps-script/issues).\n\n## 📄 License\n\nThis project is distributed under the AGPL-3.0 license. You can use, modify, and distribute this project, as long as you comply with the terms and conditions in the [LICENSE](/LICENSE) file.\n\n## 📜 Disclaimer\n\nThis script is provided as is, without any warranty or liability. Use it at your own risk. Make sure to test the script before using it on your Gmail account. The script may delete emails that you want to keep, or fail to delete emails that you want to remove. The script may also exceed the quota limits of Google Apps Script or Gmail API, resulting in errors or partial execution. The author is not responsible for any loss or damage caused by the use of this script.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchriskyfung%2Fgmail-regex-cleaner-apps-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchriskyfung%2Fgmail-regex-cleaner-apps-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchriskyfung%2Fgmail-regex-cleaner-apps-script/lists"}