Automatically research every new and abandoned signup, turn what's public about their practice into structured data, and land it in Customer.io and Pipedrive. Runs on its own metered infra, not the Claude subscription.
Jamie's sequence, agreed 23 Jul: enrichment → scraping → Tron. Enrichment is the standalone first piece because it feeds everything else: sales gets phones back, lifecycle gets the attributes the v4 signup cut (specialty, platform, insurance), and the AI onboarding agent later consumes the same enrichment docs. Jamie hypothesises 80–90% of practitioners have some online presence once directories count; the pilot's 55% is a floor from shallow searches.
v4 signup (12 Jun) killed currentSetupPlatform, so website scanning is now the only switcher detection we have. Enrichment recovers that without re-adding signup friction.
New signups: a CIO webhook action fires on signup completion (same pattern as the live Dropoff → Pipedrive chain) and POSTs the profile to the pipeline's webhook with email, name, phone, profession, provider_name, team_size, country.
Abandoned signups: campaign 86's 60-minute gate already separates genuine dropoffs from mid-flow completers (88% of entrants exit within the hour). Add one webhook action after the existing gate; no new logic needed. Post-Quim wizard identifies mean many dropoffs already carry name, phone and profession.
Output: junk_score written back to CIO and Pipedrive. Junk-flagged profiles skip enrichment, drop out of SDR lists, and stop inflating the effective-signups number Jamie quotes.
If the signup email is on a custom (non-freemail) domain, that domain is the practice website with zero ambiguity. In the pilot this was 21% of signups and caught 5 practices that name search missed. Resolve first, always.
NPPES API (npiregistry.cms.hhs.gov/api, version=2.1, no key) returns taxonomy, practice address, phone and org affiliations. Name matching is exact-field, so treat a hit as a strong identity anchor and a miss as meaningless. verified live
101Y*, MFT 106H*, LCSW 1041C0700X, psychologist 103T*, dietitian 133V*, PT 2251*, OT 225X*, SLP 235Z*.Search API query: provider/practice name + profession + state. Classify results into: own website, directory profile (Psychology Today, Tebra, Headway, Yelp, Fresha), social-only, or not found.
Fetch up to ~3 pages per lead (home, about, services) with Jina Reader (~$1–5/mo at 30k pages) or Exa contents ($1/1k pages). Skip Firecrawl's AI Extract: 9–10 credits/page (~$333/mo) buys a black box, and it benchmarks worst-in-class on bot-protected sites. Keep Bright Data as fallback for the rare protected site.
Extract deterministically first: address, socials, logo and platform detection come from parsing, not prompting. Platform detection is a signature registry of booking-embed markup (SimplePractice, TherapyNotes, Jane, Tebra, IntakeQ, Healthie, Acuity, Calendly, doxy.me). The LLM handles only the semantic fields, against a fixed JSON schema, and must return null when the evidence is missing:
website · phone · specialty_detail · services[] · address/state · accepting_insurance · current_platform (booking-embed detection: SimplePractice, Jane, Healthie, Acuity, Calendly…) · socials · brand_assets (logo URL, palette) · team_size_signalModel (deep-dive 27 Jul, incl. Chinese open-weight and new Google models): the entire field costs $12–150/mo at this volume, so pick on accuracy and risk, not price. Two findings shape the choice: producing valid JSON is a solved problem (>0.95 across models), but value accuracy tops out around 0.83, so the failure mode is well-formed JSON with a wrong specialty, and the eval must measure field correctness against a golden set, not parse success.
| Model | $/MTok in·out | Est./mo | Role |
|---|---|---|---|
| Gemini 3.5 Flash-Lite on Vertex AI (new, 21 Jul) | $0.30 · $2.50 | $55 (≈$27.50 batched) | Primary: Google built it for "classification, extraction, routing"; constrained decoding via responseSchema; Vertex gives residency + VPC-SC |
| Claude Haiku 4.5 | $1 · $5 | $150 (≈$75 batched) | Fallback: equally guaranteed schemas, fails independently of Google; keep wired up as a real second lane |
| DeepSeek V4 Flash (DeepInfra, US) | $0.10 · $0.20 | $12 | Shadow lane: run in parallel, measure agreement, free regression signal |
| GLM-5 (US-hosted) | $0.60 · $1.92 | $79 | Accuracy escalation: GLM-4.7 leads the structured-output benchmark (0.830) extrapolated |
| Gemini 3.6 Flash (new, 21 Jul) | $1.50 · $7.50 | $225 | Skip: genuinely better at coding/long-context, which this task doesn't use; 4× Flash-Lite |
| Kimi K3 (16 Jul launch) | $3 · $15 | $450 | Skip: frontier model at frontier price for a task that needs neither; capacity-constrained |
Why Flash-Lite over Haiku: both now offer real constrained decoding (not prompt-and-hope), and Vertex AI matches Anthropic on governance (residency, VPC-SC, CMEK), so the tie-breakers are fit and throughput: Flash-Lite is Google's designated extraction tier at ~490 tok/s and 2.1× cheaper. Caveat: no published head-to-head value-accuracy benchmark exists for this exact task; that's what the golden set settles, and it's why Haiku stays a wired fallback rather than theoretical.
Two integration gotchas: Gemini's responseSchema is an OpenAPI 3.0 subset, not full JSON Schema. Our flat schema (enums + string arrays) should translate cleanly, but Quim should validate it in hour one, and the Anthropic/Google lanes need a small per-provider schema adapter. And the 50% batch discount means up to 24h latency with no SLA: confirm downstream CIO campaign-entry timing tolerates that before taking it.
Governance note: the Chinese models are good and MIT-licensed; the risk is only the first-party endpoints (China-resident data, ToS permits training, no SOC 2). US hosts (DeepInfra, Fireworks, Together) dissolve it for a few dollars; if OpenRouter is used, pin provider routing to US endpoints. Platform detection stays deterministic regardless: it's inference from page markup, which is why we own this prompt rather than renting a vendor's.
Deterministic weighted scoring, never an LLM judgement call. Per Codex's review: exact phone +45, email-domain match +35, name match +20, geo agreement +15 (area code or NPI address), NPI taxonomy agreement +10, conflicting signals −30 to −60.
enrichment_status: not_found. That's a real answer; ~30% of genuine signups are invisible, and that number feeds the marketplace/public-profile case.enriched_source (email_domain / npi / search / directory) + enriched_at + confidence. Sales can see why we believe it.Store first: one enrichment doc per workspace in the pipeline's own Postgres. CRMs get projections of it; the AI onboarding agent consumes it later. Re-runs upsert, never duplicate.
Customer.io: identify via the Data Pipelines API (preferred over Track; ~3,000 req/3s, 64KB). Attributes prefixed enr_ so they can't collide with product-written attrs. Batch endpoint trap: oversized batches return HTTP 200 and silently drop, so keep batches well under 500KB and verify a sample profile after each run. verified
Pipedrive: v2 API only (v1 sunsets 31 Jul 2026, confirmed). Upsert person by email, else by phone; phone goes to the native field, specialty/platform/insurance to custom fields (fields exist for profession already via sub 764125's mapping). No batch endpoint exists, so throttle to the burst window (40 req/2s on Growth) rather than the daily token budget. verified
n8n Community Edition in queue mode on a small cloud VM (~$10–24/mo Hetzner/Lightsail/DO). Queue mode (Postgres + Redis + workers) is free in CE, and the sustainable-use licence explicitly permits internal business automation. verified
Non-negotiables: pin a patched version (a CVSS 10.0 webhook RCE, CVE-2026-21858, affected everything ≤1.65.0); don't expose the editor publicly; set execution-data pruning on day one (default threshold is 10k executions, one month of our volume, and Postgres bloats fast). verified
Homelab vs cloud: the homelab runs production-ish services fine, but this pipeline writes into Customer.io and Pipedrive, which are shared systems other people depend on. It shouldn't share fate with homelab maintenance. Recommendation (Codex concurs): small cloud VM, ~$24/mo.
A single Node/Python worker (queue + cron, ~200 lines) on the same VPS. Maximum control, minimum moving parts, and the community's honest warning about visual tools is that big workflows degrade into "one giant script on a canvas" anyway.
This is a taste decision for Quim more than an architecture decision. The pipeline design is identical either way; n8n is the default because both of you can see it.
Clay restructured its pricing in March 2026: a 5–6 step waterfall at 10k leads/mo lands on Growth (~$446/mo) or Enterprise, and its HIPAA/BAA posture could not be verified at all, which matters for a healthcare vertical. Cargo Professional is $1,190/mo. Persana is being sunset into Rox (do not build on it). FullEnrich's self-serve tiers are too small at this volume. pricing verified Clay HIPAA unverified
Managed platforms earn their fee on contact-data waterfalls (email/mobile lookup across 10+ vendors). Our problem is different: identity resolution + custom extraction on public healthcare data, where the paid data layer adds nothing over free NPPES + $6 of search. Wrong tool at ~20–40× the run cost.
| Monthly cost at ~10k enrichments | Core | With optional add-ons |
|---|---|---|
| Search (DataForSEO/Serper) + fetch (Jina/Exa) | $10–35 | — |
| LLM extraction (Vertex Flash-Lite primary ≈$27.50–55; +$12 DeepSeek shadow lane; Haiku fallback on standby) | $40–70 | — |
| VPS for n8n + Postgres + Redis | $10–20 | — |
| Email verification (Bouncer/ZeroBounce) | — | $40–100 |
| Phone line-type (Telnyx $0.007/lookup) | — | ~$70 |
| Total estimate — Codex's independent all-in figure: $225–300/mo (~$0.03/enriched signup) | ~$35–205/mo | ~$150–375/mo |
Codex independently converged on the same shape (email-domain-first waterfall, free NPPES, cheap search, own extraction, n8n + small VM) and priced it at ~$225–300/mo all-in, about $0.03 per enriched signup. Three of its calls are upgrades this plan adopts:
Where it differs, and the resolution: Codex prefers a TypeScript worker holding the logic with n8n as thin orchestration (the hybrid is now the recommended infra option); Gemini Flash-Lite as extraction model where this plan starts on Haiku 4.5 and validates down (superseded by the 27 Jul model deep-dive in stage 5: Haiku primary, 3.5 Flash-Lite fallback, DeepSeek shadow lane); and a cloud VM over the homelab, agreed here for isolation: this pipeline writes into shared production systems, so it shouldn't share fate with homelab maintenance.
Codex also flagged: SSRF protection on website fetches (block private/metadata IP ranges), idempotency keys + dead-letter queue per stage, partial enrichment is a valid result, abandoned-then-completed signups must upgrade one canonical record rather than create two, and abandoned signups are identifiable people so document the lawful basis and honour deletion.
Stand up n8n + Postgres, wire triggers, junk gate, email-domain + NPI + search waterfall, extraction, confidence scoring. Run in shadow mode first: log intended CIO/Pipedrive writes for 1–2 weeks without executing, validate the false-match rate, then flip live (matches the house rule: automated CIO actions start disabled, Carlos enables). First live consumer: recovered phones → Pipedrive. Success = phone coverage on new signups moves from 71% toward ~85% (estimate; ceiling is the ~55% findability floor).
enr_specialty, enr_current_platform, enr_accepting_insurance, enr_website into CIO. Re-feeds RCM targeting and switcher campaigns that v4 starved. Carlos owns which campaigns consume what.
Brand auto-intake (logo/colours on workspace) and prefilled services from the stored enrichment docs. This is the Tron on-ramp: same docs, new consumer, no rebuild.
Running the existing base (e.g. active trials, the 232k reactivation list) through the pipeline is powerful but needs the CIO segment audit and Pipedrive throttling plan first. Separate go/no-go.