- Open Command Line
- Clone this repo
- Create Virutal Environment(Follow: https://docs.python.org/3/library/venv.html) and activate
- Run
pip install -r requirements.txt
to install the dependencies - Login to Google Developer Console and create Gmail API app and copy the credentials to
credentials.json
and move it to this folder - Run
db_seeds_setup.py
to setup DB in local - Run
python -m unittest discover
to run the unittest cases - Run
python extract_emails.py
and enter the number of email to process to download and store in the DB, this will openup an Gmail OAuth. Please give necessary permission. - Modify the
rules.json
file as required - Run
python apply_rules_to_emails.py
to apply the rules and actions from rules.json to the data we stored in the DB which will reflect in actual Gmail account
- Implement Message Queue to handle large volume of the emails
- Implement Vector indexing for the text columns to improve the DB lookup