{"id":21581426,"url":"https://github.com/marckassay/gmailfilterutil","last_synced_at":"2025-10-10T06:19:17.172Z","repository":{"id":146406314,"uuid":"240930195","full_name":"marckassay/GmailFilterUtil","owner":"marckassay","description":"A PowerShell module for updating Gmail filters","archived":false,"fork":false,"pushed_at":"2020-04-11T20:07:02.000Z","size":37,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-02T14:55:40.478Z","etag":null,"topics":["blacklist","email-black","filter","gmail","powershell","recruiter"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/marckassay.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-02-16T17:02:17.000Z","updated_at":"2024-04-20T13:39:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"b52ee6f0-30cb-4b48-8d71-2c6fd841ec8c","html_url":"https://github.com/marckassay/GmailFilterUtil","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marckassay/GmailFilterUtil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marckassay%2FGmailFilterUtil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marckassay%2FGmailFilterUtil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marckassay%2FGmailFilterUtil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marckassay%2FGmailFilterUtil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marckassay","download_url":"https://codeload.github.com/marckassay/GmailFilterUtil/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marckassay%2FGmailFilterUtil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002970,"owners_count":26083488,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["blacklist","email-black","filter","gmail","powershell","recruiter"],"created_at":"2024-11-24T14:12:29.076Z","updated_at":"2025-10-10T06:19:17.168Z","avatar_url":"https://github.com/marckassay.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GmailFilterUtil\r\n\r\nThis module has been created to address the following:\r\n\r\n- _Unable to edit large filter lists in Gmail_. It seems that Gmail doesn't allow editing large filter sets without receiving an error popup. For whatever reason why this is, I \"quickly\" created this module because of it.\r\n- _Quickly update Gmail filter list_. Although, this requires additional steps to be done in Gmail, this module allows you to update your local Xml filter file to be uploaded anytime afterwards. Use the [`Add-FromList`](https://github.com/marckassay/GmailFilterUtil/blob/0.0.4/docs/Add-FromList.md) function to add new entries.\r\n- _To have predefined Gmail filter lists_. From the plethora of recruiters contacting me, I found myself inundated to the point I was avoiding to view my inbox. Filters are a powerful tool in Gmail, so that you can avoid even seeing or needing to delete messages, which is what I needed to filter recruiter messages. Having predefined lists makes enabling this process much less painful. Submit a PR to update or add new lists!\r\n\r\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/marckassay/GmailFilterUtil/blob/0.0.4/LICENSE)\r\n[![PS Gallery](https://img.shields.io/badge/install-PS%20Gallery-blue.svg)](https://www.powershellgallery.com/packages/GmailFilterUtil/)\r\n\r\n## Examples\r\n\r\nIn order to use this PowerShell module, you must download an initial filter from a Gmail account. It may be empty. Or it may just have a single entry. If needed, instructions can be found [here](https://support.google.com/mail/answer/6579) on managing Gmail filters.\r\n\r\nWhen you have a exported filter from your Gmail account, you can update it by doing this following:\r\n\r\n```powershell\r\nImport-XmlFilter -Path 'C:\\temp\\mailFilters.xml' | `\r\n  Add-FromList -Value \"*@aerotek.com\" | `\r\n  Export-XmlFilter -Path 'C:\\temp\\mailFilters.xml'\r\n```\r\n\r\nThis example uses the [`Add-FromList`](https://github.com/marckassay/GmailFilterUtil/blob/0.0.4/docs/Add-FromList.md) function to add additional entries, as to juxtapose with [`Set-FromList`](https://github.com/marckassay/GmailFilterUtil/blob/0.0.4/docs/Set-FromList.md), which sets the value of `Value` parameter as-is, removing any existing values. This function-verb behavior aligns with PowerShell's `Add-Context` and `Set-Context` functions.\r\n\r\nAnother example, is to use a predefined list of entries. For instance, the `recruiters.us` list:\r\n\r\n```powershell\r\n$RecruiterEntries = Read-PredefinedFromList -ListName 'recruiters.us'\r\n$RecruiterEntries += '*@techcorpsystems.com'\r\n$RecruiterEntries | Export-XmlFilter -Path 'C:\\temp\\mailFilters.xml'\r\n```\r\n\r\nAbove, an additional entry is added to `GmailFilter` data type and exported back to `mailFilter.xml` file.\r\n\r\n## API\r\n\r\n#### [`Add-FromList`](https://github.com/marckassay/GmailFilterUtil/blob/0.0.4/docs/Add-FromList.md)\r\n\r\nAdds entries to a From list.\r\n\r\n#### [`Export-XmlFilter`](https://github.com/marckassay/GmailFilterUtil/blob/0.0.4/docs/Export-XmlFilter.md)\r\n\r\nExports PowerShell data back to Gmail exported filter.\r\n\r\n#### [`Import-XmlFilter`](https://github.com/marckassay/GmailFilterUtil/blob/0.0.4/docs/Import-XmlFilter.md)\r\n\r\nImports into PowerShell session, a Gmail exported filter.\r\n\r\n#### [`Read-PredefinedFromList`](https://github.com/marckassay/GmailFilterUtil/blob/0.0.4/docs/Read-PredefinedFromList.md)\r\n\r\n{{Fill in the Synopsis}}\r\n\r\n#### [`Set-FromList`](https://github.com/marckassay/GmailFilterUtil/blob/0.0.4/docs/Set-FromList.md)\r\n\r\nSets entries to a From list.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarckassay%2Fgmailfilterutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarckassay%2Fgmailfilterutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarckassay%2Fgmailfilterutil/lists"}