Website RAG + Leads Bot
LIVEShipped a production RAG chatbot with lead capture and real-time alerts on my site — zero custom website backend, two script tags, all logic in n8n.

What it does
A production AI chatbot that answers visitor questions from the site’s own content (RAG), captures leads (name + email) with database-level validation, and sends real-time notifications via email and Telegram — with no custom backend on the website.
How it works
- Embed — two script tags load the chat widget on the site; visitors enter name and email before chatting.
- Webhook — the widget posts messages to a self-hosted n8n production webhook.
- RAG — an n8n AI Agent retrieves relevant chunks from Supabase pgvector (Gemini embeddings) and replies with OpenRouter (Gemini 2.5 Flash).
- Leads — name and email are stored in Supabase with validation; alerts fire over email/Telegram.
- Ops — PII handling, RLS, and credential hygiene stay in the n8n + Supabase layer, not in site code.
What I built
- Self-hosted n8n workflows for chat, RAG retrieval, lead capture, and notifications
- Supabase pgvector knowledge base with Gemini embeddings
- Embeddable chat widget (two script tags, zero custom website backend)
- Production-grade lead storage with DB-level validation and real-time alerts
Stack
n8n (self-hosted) · Supabase (pgvector RAG) · Google Gemini embeddings · OpenRouter (Gemini 2.5 Flash)