Skip to main content

Lead Scraper & Import Directive

Purpose

Automate the process of generating leads, storing them in a shared Google Drive for review/enrichment, and importing them into GoHighLevel (GHL) for outreach.

Inputs

  • Search Query (e.g., "Med Spas in Austin, TX")
  • Target Client (for Drive folder selection)
  • GHL Sub-account API Key (or OAuth Token)

Scripts

  • core/execution/scrape_leads.py: Fetches lead data.
  • core/execution/setup_drive.py: (Utilized for Drive connection)
  • core/execution/import_ghl.py: Pushes contacts to GHL.

Process

  1. Scrape Leads

    • Run scrape_leads.py with a query.
    • Output: A raw dataset (JSON/CSV) of businesses include Name, Phone, Email, Website, Address.
    • Note: Requires valid scraping logic/API (e.g., Google Maps, Yelp).
  2. Drive Upload & Formatting

    • The scrape_leads.py script automatically:
      • Connects to the User's Google Drive.
      • Locates the client's "Leads" or "Visuals" folder.
      • Uploads the raw data as a Google Sheet.
    • User manually reviews the Sheet, removes bad leads, and adds personal notes.
  3. GHL Import

    • User runs import_ghl.py pointing to the Google Sheet (or exports it to CSV).
    • Script reads the clean data.
    • Maps columns to GHL Fields (Name -> First/Last, Phone -> Phone, etc.).
    • Batch creates contacts in GHL.

Outputs

  • Google Sheet: "Leads - [Date] - [Query]" in Client's Folder.
  • GHL Contacts: New contacts created in the sub-account with tag scraped_lead.

Edge Cases

  • Duplicate Leads: GHL handles duplicates by email/phone. Script should log skips.
  • Missing Data: If no email/phone, lead might be skipped or tagged manual_review.
  • API Limits: Both Google Drive and GHL have rate limits; scripts must handle backoff.

Learnings

Update as you discover constraints, better approaches, timing expectations.

  • [2025-12-11] Initial pipeline design. Assuming Google Maps as primary source.