Overview
Real-time lead scoring on inbound webhooks: enrich via Scavio, apply 12-line weighted rubric in LLM prompt, write back to CRM, route to right channel.
Trigger
Inbound webhook (form submission, CRM new lead, Salesforce flow)
Schedule
Real-time (webhook)
Workflow Steps
Catch lead webhook payload
n8n Webhook node, return 200 fast.
Scavio company enrichment
site:linkedin.com/company {{company}} → top 3 results.
LLM rubric scoring
12-line weighted rubric in system prompt, return { score, reason } JSON.
Switch on score band
Score >=70 → Slack hot. 40-69 → drip campaign. <40 → nurture.
CRM write-back
Update lead with score + reason + timestamp.
Optional Slack notify per band
Hot leads ping AE + summary.
Python Implementation
import requests, os
H = {'x-api-key': os.environ['SCAVIO_API_KEY']}
RUBRIC = """Score 0-100 using ONLY this rubric. Return {"score":int,"reason":"..."}.
Title fit:30 Industry:25 Company size:20 Intent:15 Fit notes:10"""
def enrich(company):
r = requests.post('https://api.scavio.dev/api/v1/search', headers=H,
json={'query': f'site:linkedin.com/company {company}'}).json()
return r.get('organic_results', [])[:3]JavaScript Implementation
// Same shape in TS / n8n. n8n is the deliverable.Platforms Used
Web search with knowledge graph, PAA, and AI overviews