Built an end-to-end lead-intake triage, logging, and urgency-based alerting workflow in n8n. Context: Inbound leads often sit unreviewed or get delayed when inquiries come in from a contact form without structured qualification or instant routing. To solve that, I wired up a flow that validates incoming leads, uses AI to classify and summarize them, logs clean records into a database, and alerts on high-urgency cases. How the workflow runs: - Intake & Validation (Webhook → If): Receives lead fields (full_name, email, phone, company, message, source, page_url, submitted_at) and checks for valid email, non-empty message, and minimum message length—sending invalid entries to NoOp. - AI Triage (AI Agent + Gemini + Structured Output Parser): Evaluates the inquiry to extract intent, urgency, a concise summary, and a draft_reply. - Structuring & Database Logging (Edit Fields1 → Supabase Create a row): Maps fields cleanly and inserts records into the leads table. - Urgency Routing (If1 → Slack): Checks if urgency equals High and posts an alert to #high-urgency-leads, while routing other leads to NoOp