EmailPriorityClassifier intelligently evaluates incoming emails and threads to determine how urgently they require user attention.
By analyzing subjects, senders, message bodies, Gmail’s native classifications, and user-assigned labels, it generates a priority score and assigns each message a clear Priority label (P1–P3). The ability to freely configure system prompts allows for flexible labeling and priority logic (e.g., always assigning emails from specific topics or senders to P1).
This application supports both OpenAI models and OpenAI-compatible local LLMs such as those running through LM Studio, allowing users to choose between high-efficiency cloud models and fully private, on-device inference. This flexibility enables streamlined inbox triage while meeting diverse performance and privacy requirements.
- Python 3.13.5
- pyenv (recommended)
- pipenv
-
(If you use pyenv, and did not install Python 3.13.5 yet)
pyenv install 3.13.5
-
Clone this repository
git clone https://github.com/KO1231/EmailPriorityClassifier.git cd EmailPriorityClassifier -
Install dependencies using pipenv
pip3 install pipenv pipenv install
-
Prepare Secrets and configuration
- Create a
.envfile in the project root directory based on the.env.examplefile. - Create a
config.ymlfile in the project root directory based on theconfig.yml.examplefile. - Create a
client_secrets.jsonfile in the project root directory for Gmail API credentials (for Desktop Application).
- Create a
-
Create Oauth2 tokens
pipenv run login_google
pipenv run start