Production Website Webhook-to-n8n Lead Qualification, Logging & Routing System
The live 18-node inquiry workflow powering AwtomateAI: validates authenticated website webhooks, qualifies prospects with OpenRouter, logs records in Google Sheets, and routes tiered Gmail responses.
Live 18-node website inquiry pipeline with persist-first Supabase storage, authenticated n8n webhook handoff, OpenRouter qualification, and tiered Gmail routing.
PROBLEM & ARCHITECTURE
How the system works
PROBLEM ADDRESSED
Why naive automation fails here
Manual lead triage delays response times and mixes structured intake fields with unparsed free-text descriptions.
TECHNOLOGY STACK
Core components
n8n (18 nodes)Next.js API RoutesSupabaseOpenRouterJavaScriptGoogle SheetsGmail
EXECUTION FLOW
Architecture steps
Next.js API route persists submissions durably in Supabase PostgreSQL first, then dispatches an authenticated webhook with X-Awtomate-Secret header to n8n.
n8n normalizes fields and runs an OpenRouter AI qualification agent with structured JSON parsing.
Appends qualified records to Google Sheets and routes high-value, standard, and lower-priority paths to tailored Gmail workflows.
RELIABILITY CONTROLS
Deterministic safeguards
Persist-first database pattern ensures inquiries are saved in Supabase even if an external webhook temporarily times out.