Answer support FAQs with Google Gemini, Supabase, Google Sheets and WhatsApp
Quick overview This workflow ingests FAQs from Google Sheets into a Supabase vector table using Google Gemini embeddings, then serves a webhook-based support chatbot that answers only from that FAQ knowledge base and escalates unanswered questions to a human via UltraMsg WhatsApp.
How it works Runs manually to pull FAQ rows (Question/Answer) from a Google Sheets spreadsheet. Formats each row into a single text document (for example, Q: … A: …), generates embeddings with Google Gemini, and inserts the documents into a Supabase vector store table. Receives incoming chat messages via a POST webhook that includes message and sessionId. Uses a Google Gemini chat model with session-based memory to query the Supabase vector store for the most relevant FAQ matches and generates a reply strictly from the retrieved content. If the agent output indicates escalation to a human, sends the full message content to UltraMsg via an HTTP request to alert a WhatsApp number. Returns a JSON response to the webhook caller with either the FAQ-based answer or a confirmation that a human agent has been notified.
Setup Add credentials for Google Gemini (PaLM) API, Supabase, and Google Sheets OAuth2. In Supabase, create or select the vector table used for the knowledge base (configured as “FAQs Data Table”). Update the Google Sheets document and sheet selection to point to your FAQ spreadsheet with Question and Answer columns. Configure the UltraMsg endpoint details (instance URL), token, destination WhatsApp number, and message body to match your WhatsApp routing. Copy the webhook URL from n8n and configure your chat frontend or integration to POST message and sessionId to it. Execute the manual FAQ ingestion flow at least once to populate Supabase before sending live chat traffic.
Requirements ✅ n8n account (free) ✅ Google Sheets (free) ✅ Supabase account (free) ✅ UltraMsg WhatsApp API (free trial) ✅ Google Gemini AI (FREE from AI Studio!) ✅ Netlify for hosting widget (free) 💡 Google Gemini API is completely FREE from aistudio.google.com — no credit card needed to get started! For long term heavy usage, Gemini paid plans start from just $0.00015 per query — practically FREE!
Tags
Related Templates
AI Weather Forecasts with MCP Integration
Real-time Weather Forecasts with MCP Tools This n8n workflow demonstrates how to integrate real-time weather intelligen...
Google Sheets UI for n8n Workflow
Google Sheets UI for Workflow Control This n8n template provides a practical and efficient way to manage your n8n workf...
Demo Workflow - How to use workflowStaticData()
This workflow demonstrates how to use the workflowStaticData() function to set any type of variable that will persist wi...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments