This module is responsible for performing periodic queries (polling) to the Gmail API to detect, process, and manage emails automatically.
The system utilizes official Google libraries to authenticate, list messages, and download their content. For this component to function correctly, it is mandatory to configure the environment in the Google Cloud Console and generate local access credentials.
To get this system up and running, you must follow these two mandatory configuration processes:
Before running the code, you must enable the Gmail API and configure the OAuth consent screen in the Google Console.
- Detailed Guide: Google Cloud Setup
The system uses a session file called token.pickle to avoid manual login every time the script is executed.
- Step-by-Step Instructions: Token Generation and Credentials
Ensure you have the necessary dependencies installed before running the service (if the requirements.txt is installed correctly there shouldn't be a problem):
pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib