This project can be used to automate first contacts followups to 4Geeks.com Self Paced Leads
Windows:
python -m venv .venv
.venv\Scripts\activateLinux/macOS:
python3 -m venv .venv
source .venv/bin/activatepip install -r requirements.txtAdd the following configuration (Agrega la siguiente configuración):
DEEPSEEK_API_KEY=your_api_key_here
ENVIRONMENT=development # or 'production'
CHROME_EXECUTABLE="C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" # Windows default
DEBUG=true
REMOTE_DEBUGGING_PORT=9222Linux: CHROME_EXECUTABLE="/usr/bin/google-chrome"
macOS: CHROME_EXECUTABLE="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
Windows:
"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="%TEMP%\chrome-dev-profile"Linux/macOS:
# Close any existing Chrome instances / Cierra cualquier instancia de Chrome existente
pkill -f 'chrome' || true
# Start Chrome / Inicia Chrome
google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-dev-profile
# macOS: use the CHROME_EXECUTABLE path above if neededReplace <list-slug> with your list name (Reemplaza <list-slug> por el nombre de tu lista):
python src/followup-next.py --list=<list-slug>Example / Ejemplo:
python src/followup-next.py --list=4ga-lost- Works on Windows, Linux, and macOS / Funciona en Windows, Linux y macOS
- Requires Python 3.8+ / Requiere Python 3.8+
- Needs Chrome installed / Necesita Chrome instalado
- You must set up your
.envfile / Debes configurar tu archivo.env - Start Chrome with remote debugging / Inicia Chrome con depuración remota
- Run the agent script / Ejecuta el script del agente
The application supports two modes:
-
Development Mode (
ENVIRONMENT=development):- Only processes contacts with @4geeksacademy.com email addresses
- Other contacts are skipped and left in PENDING status
- Useful for testing message templates and flows
-
Production Mode (
ENVIRONMENT=production):- Processes all contacts regardless of email domain
- Use this mode for real follow-up campaigns
- Start Chrome with remote debugging:
# Windows (recommended)
"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="%TEMP%\chrome-dev-profile"
# Alternative for Linux/macOS
# First close any existing Chrome instances:
pkill -f 'chrome' || true
# Then start Chrome with debugging:
google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-dev-profile- Run the followup process (replace
<list-slug>with your list name):
python src/followup-next.py --list=<list-slug># For 4Geeks Lost Customers follow-up
python src/followup-next.py --list=4ga-lostIf you add new dependencies to the project, make sure to update requirements.txt:
pip freeze > requirements.txtWhen running in production mode:
- Set
ENVIRONMENT=productionin your.envfile - Ensure Chrome is not running before starting the automation
- Consider using a dedicated Chrome profile to avoid conflicts
- Test your message templates with development mode first
The automation follows this status flow for each contact:
PENDING- Initial state for new contactsSTARTED- Contact is being processedCOMPLETE- Messages sent successfullyERROR- Error during processing (with error details in status text)
- If Chrome fails to start:
Windows:
# Kill any existing Chrome processes (run in PowerShell as Administrator)
taskkill /F /IM chrome.exe
# Remove test profile (optional)
Remove-Item -Path "$env:TEMP\chrome-dev-profile" -Recurse -ForceLinux/macOS:
# Kill any existing Chrome processes
pkill -f 'chrome'
# Remove test profile (optional)
rm -rf /tmp/chrome-dev-profile- If WhatsApp Web doesn't load:
- Ensure you're logged in to WhatsApp Web in your Chrome profile
- Check your internet connection
- Verify the phone number format in the contact data
-
Development Mode:
- Only @4geeksacademy.com contacts are processed
- Other contacts remain in PENDING status
- Use this mode to test your message templates
-
Production Mode:
- All contacts are processed regardless of email domain
- Messages are personalized using contact data
- Status updates are logged for tracking