Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sergiopvilar/gmail-filter-manager
A tool written in javascript to help you manage your gmail filters out of gmail
https://github.com/sergiopvilar/gmail-filter-manager
Last synced: about 1 month ago
JSON representation
A tool written in javascript to help you manage your gmail filters out of gmail
- Host: GitHub
- URL: https://github.com/sergiopvilar/gmail-filter-manager
- Owner: sergiopvilar
- Created: 2019-11-27T16:26:02.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-07T01:18:20.000Z (over 3 years ago)
- Last Synced: 2024-04-17T03:50:45.047Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gmail Filter Manager
A tool written in javascript to help you manage your gmail filters out of gmail
## Features
- Support to your current filters through Gmail exported .xml
- Delete filter: deletes all emails from an email list
- Review filter: ignores from the inbox and adds a label so you can review before delete## Setup
You'll need node.js and yarn to run this tool.
Install the dependencies:
```
yarn install
```Create an `.env` file at the root level with the following information:
```
ARCHIVE_LABEL='Review before delete'
PRIORITY_MAIL='[email protected]'
```- `ARCHIVE_LABEL` is the label applied to the Review filter
- `PRIORITY_MAIL` is the email addresses you can use to ignore the filters generated by this tool## Feeding with your data
### Current Filters
You can start managing your filters by exporting them in Gmail and adding the .xmls into `/input` directory.
All .xml files there will be imported and parsed.### Email Lists
You can manage new filters by using email lists in the `/lists` directory:
- `delete.txt`: list of emails that will be deleted
- `archive.txt`: lisf of emails that will be ignored from the inbox and have the custom label appliedThe lists are expected to have one valid email per line.
### Updating Mail Lists
It will be hard to keep your filters updated once you have imported everything, so in order to do that you can use
these two files to add new email addresses to a separated filter file where you can import in gmail only the new ones
and not the whole list. The new emails will be added to the respective `delete.txt` and `archive.txt` files once the
.xml file is generated.- `delete_update.txt`: lisf of new emails that will be deleted
- `delete_update.txt`: lisf of new emails that will be ignored from the inbox and have the custom label applied## Running
To convert your mail lists into filter files you'll need to run:
```yarn start```
This will:
- Clear the previous output files
- Import your .xml filters
- Generate new .xml filters based on your lists## Importing into Gmail
This tool split the filters in many files this way you won't need to worry about Gmail stucking during the import.
These files will be generated under the `/output` directory:- `archive_n.xml`: All emails that will be ignored from inbox and have the custom label applied (many files)
- `delete_n.xml`: All emails that will be deleted (many files)
- `filter_n.xml`: All your .xml filters you added to the `/input` directory (many files)
- `delete_update.xml`: New filters added to the delete list
- `archive_update.xml`: New filters added to the archive listNotice that the _delete.xml files could be imported separately so you won't need to import everything when adding new
emails to a list.