Kolton Dupey · 2025-07-04 · 8 min read
Automating Lead Capture from WiserAdvisor with Python + Selenium
Automation

- Logs into my WiserAdvisor advisor dashboard
- Scrapes the latest lead from their table
- Prevents duplicate processing
- Sends the lead to our CRM (Salesforce) and adds tracking parameters
- Runs on a Raspberry Pi, 24/7
🧠 The Why: Automating Lead Capture
When WiserAdvisor delivers a lead, I want to:
- Capture it immediately
- Push it into our CRM (in this case, via a tracked Pardot Form Handler URL)
- Ensure I don't log the same lead twice
🛠️ Tools Used
- Python – the glue for the automation
- Selenium – to log in and simulate browser actions
- WebDriver Manager – to manage ChromeDriver versions
- requests – to send captured data to our CRM
- sched – to re-run the process every 2 minutes
- logging – for easy monitoring and troubleshooting
- Raspberry Pi 4 – lightweight, low-power always-on deployment
🍓 Why Run This on a Raspberry Pi?
- 💡 Low Power: It sips electricity, making it perfect for a 24/7 script
- 💸 Cost-Effective: No need to spin up a cloud VM or dedicate a full PC
- 🧘♂️ Set-and-Forget: Once configured, the Pi just runs quietly in the background
- 🧰 Full Linux Environment: Makes it easy to install Python packages, set up Chrome + Selenium, and run headless automations
chromedriver, and added the script to a
systemd service to auto-start on boot. That way, even if
the Pi reboots, the lead scraper picks up where it left off.🔐 Authentication with Selenium
The login process requires a full browser session.
WebDriverWait to find and
fill out the login form.
📋 Scraping the Lead Table
<body>. No HTML parsing
necessary—we just json.loads() the content.
🚀 Sending to CRM (Pardot Form Handler)
🔁 Running Every 2 Minutes with sched
sched
module to re-run the job every 2 minutes inside a long-lived process:
systemd, it's self-restarting and resilient.🧪 Error Handling + Stability
- ❌ Network or login errors? Logged and skipped
- 🔁 Duplicate lead? Skipped
- 🧱 WiserAdvisor structure changes? Will throw a visible trace in logs
- 🔄 Reboots? Covered—systemd restarts the script automatically
🔮 Alternative Methods
- A Raspberry Pi is not needed. You can run this on a Windows machine or even host it as a web service on a platform like Render or Vercel. If you do try to host on a cloud platform, you will more than likely need to involve a proxy service for an extra cost. More and more sites are starting to block web scraping originating from a cloud platform such as a Render or Vercel IP block. A proxy will "mask" your origination. Residential proxies will work the best but are generally more expensive than a datacenter or cellular IP.
- Instead of scraping every 2 minutes, the script could be altered to run when an email is received by WiserAdvisor notifying you of a new lead. You could have the notification come to your email or your sales team but set up a rule to forward to an address monitored by a Python script. Once the email hits that inbox, the scraping script could start.
- This can work for any CRM or marketing platform.
👋 Final Thoughts
– Kolton Dupey
Want this built for your business?
This post comes from a real engagement. Dealing with something similar? Book a 15-minute call and I'll tell you what it would take.
Related posts

Google Maps Lead Generation: Automate Business Discovery with n8n (Step-by-Step Guide)
This workflow searches Google Maps for businesses in your niche, resolves each listing to its website, scrapes the site with polite rate-limits, extracts valid emails + company info, de-duplicates, and appends the results to Google Sheets—perfect for outbound campaigns.
7 min read · 2025-08-31
Read post →
The Ultimate Guide to Enterprise Document Automation: A Deep Dive into Advanced DocuSign Integration
Explore a sophisticated Python-based DocuSign automation system with over 2,400 lines of production-ready code that transforms manual document workflows into highly efficient, scalable operations for enterprise environments.
15 min read · 2025-08-22
Read post →
Automating Earnings Call Intelligence with Python, GPT-4, and Twitter Integration
Learn how to build an end-to-end automation pipeline that scrapes earnings call transcripts, summarizes them using GPT-4, extracts sentiment and strategic insights, and posts results to Twitter for scalable financial content production.
10 min read · 2025-07-23
Read post →