This is an interview assignmet project which is a standalone python script to fetch mails from gmail using GMAIL API and process rules mentioned in rules.json file.
Please follow the below steps for successful execution of this script.
-
Run the below command and the install the required modules.
pip install -r requirements.txt
-
Enable the GMAIL API and place the credentials.json file in the project folder
-
Run the below command which will get the mails from GMAIL, creates a sqlite3 database (emails.db), stores the email in GMAIL table
python gmail.py
-
Run the below commad to process the rules as per the rules mentioned in rules.json
python rulesProcessing.py