This Python script is designed to notify a WhatsApp user or group about new web leads from the DealerNet system for automotive dealerships in Brazil. DealerNet doesn't have a built-in notification system, so this script serves as a workaround to keep users informed about new leads.
- Clone this repository:
git clone https://github.com/guinacio/dealernetLeadNotifier.git
cd dealernetLeadNotifier
- Create a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate # On Windows, use 'venv\Scripts\activate'
- Install dependencies:
pip install -r requirements.txt
playwright install
- Create a
credentials.env
file with your DealerNet and WhatsApp API credentials:
USERNAME_CR=<Your_DealerNet_Username>
PASSWORD_CR=<Your_DealerNet_Password>
API_KEY=<Your_WhatsApp_API_Key>
Replace <Your_DealerNet_Username>
, <Your_DealerNet_Password>
, and <Your_WhatsApp_API_Key>
with your actual credentials. Or you can edit the example .env file manually.
- Adjust constants in the script such as
WAIT_TIME
,LOGIN_URL
,DEALERNET_USERNAME
,DEALERSHIP
, andurl
according to your setup.
Run the script:
python lead_notifier.py
The script will run continuously, checking for new leads at the specified intervals.
- The script logs errors in the
playwright_errors.log
file. - Adjust the
NOTIFY_ERROR
variable to control error notifications.