What This Workflow Does
This automation creates an intelligent chatbot that engages website visitors while capturing their contact information. Unlike basic chatbots, it uses Google's Gemini AI combined with Retrieval-Augmented Generation (RAG) from Supabase to provide accurate answers based on your specific business knowledge.
The system automatically saves conversations and lead details to your database, enabling follow-up through your CRM or email marketing platform. It reduces support workload while converting more visitors into qualified leads.
How It Works
1. Visitor Interaction
When a visitor engages with the chatbot widget on your website, their message gets processed by the n8n workflow. The system checks if it's a simple greeting or requires knowledge base lookup.
2. AI Response Generation
For complex queries, the workflow queries your Supabase RAG database to find relevant information. Gemini AI then crafts a natural response combining this data with its general knowledge.
3. Lead Capture
At strategic points in the conversation, the chatbot prompts for contact details. Collected information gets stored securely in Supabase with timestamps and full conversation history.
Who This Is For
This solution benefits businesses that receive frequent website inquiries but lack 24/7 support. It's ideal for:
- E-commerce stores needing product advice automation
- Service businesses wanting to qualify leads after hours
- SaaS companies reducing support ticket volume
- Agencies offering client websites with built-in AI features
What You'll Need
- Google Cloud account with Gemini API access
- Supabase project with vector database setup
- n8n instance (cloud or self-hosted)
- Website to embed the chatbot (any platform)
- Optional: CRM integration for lead follow-up
Quick Setup Guide
- Download and import the JSON template into your n8n instance
- Configure your Gemini API credentials in the workflow
- Connect your Supabase database with RAG collections
- Add your website domain to CORS settings
- Embed the provided chat widget code on your site
Key Benefits
24/7 lead generation: Capture qualified leads even when your team is offline, with full conversation history for context.
Reduced support costs: Automatically answer common questions, freeing staff for complex inquiries.
Higher conversion rates: Engage visitors at the perfect moment with personalized responses.
Easy customization: Train the bot on your specific products, services, and documentation.
No coding required: The template provides everything needed for deployment without developer help.
Pro tip: Start by training your RAG system on customer support tickets and product documentation. This gives the chatbot immediate access to your most valuable knowledge.