Lead Enrichment and Scoring
Module 18 · business · intermediate
Solutions 18 · Lead Enrichment and Scoring
Exercise 1
Replace the No Operation node with Slack/Telegram/Gmail:
🔥 {{ $json.company }} ({{ $json.score }}/100, {{ $json.industry || 'industry unknown' }})
{{ $json.reasons.slice(0, 3).join(' · ') }}
{{ $json.pitch_angle || $json.summary || '' }}
📧 {{ $json.signals.emails.join(', ') || $json.email }} · ☎️ {{ $json.signals.phones.join(', ') || 'no phone found' }}
{{ $json.website }}
Exercise 2
New workflow 18b - Enrich a Sheet:
Manual Trigger → Google Sheets (Get Row(s): Leads To Enrich) → Loop Over Items (batch 1)
loop → HTTP Request (POST http://localhost:5678/webhook/leads/enrich, JSON body {{ { email: $json.email, website: $json.website } }})
→ Wait (2 seconds) → back to Loop Over Items
done → (optional) Slack "Enriched N leads"
The enrich endpoint saves each row itself (upsert by email), so the batch workflow only orchestrates. Set the HTTP Request timeout above the slowest expected run (AI + fetch), e.g. 60 s, and turn on Continue on Error so one bad lead doesn't stop the batch.
Exercise 3
- In
Extract Signals, find the link and resolve it (noURL()in the sandbox, so do it by hand):
and includeconst aboutHref = html.match(/<a[^>]+href=["']([^"']*about[^"']*)["']/i)?.[1] ?? ''; const origin = lead.website.match(/^https?:\/\/[^/]+/)?.[0] ?? ''; const about_url = !aboutHref ? '' : /^https?:/i.test(aboutHref) ? aboutHref : origin + (aboutHref.startsWith('/') ? '' : '/') + aboutHref;about_urlin the output. - IF
Has About Page?→ HTTP RequestFetch About(same options as Fetch Website, on error continue) → CodeMerge About Text: strip tags like Extract Signals and append topage_text(cap at 6,000 chars). The false branch passes through. Both feed Rule Score. - For the demo, add
'acme-dental/about'-style pages: change the demo webhook path todemo-sites/:site/:page?or add a second webhookdemo-sites/:site/about.
Not run end-to-end yet; test it against an extended demo site first.
Stretch
HubSpot: after Combine, HubSpot → Contact → Create or Update by email with custom properties lead_score, lead_tier, enrichment_summary (create them in HubSpot first). GoHighLevel: reuse Module 14's two HTTP Requests (tags + note), with the contact id from your CRM trigger.