Build website Q&A chatbot with RAG, OpenAI GPT-4o-mini and Supabase Vector DB
Needs changesWhat this workflow does
This AI workflow has 14 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects Supabase Vector Store, Embeddings Cohere, Postgres Chat Memory and OpenAI Chat Model.
How it runs
Trigger: When a chat message arrives (plus 1 other trigger).
- Question & Answer Retrieve (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 1 tool (Data From Supabase Vector Store); memory: Chat Memory
- Website Data Scrapping (HTTP Request): calls an HTTP API
- HTML Extract: uses HTML Extract
- Convert to File: converts data to a file (to json)
- Supabase Vector Store: stores documents in the Supabase vector store, with embeddings: Embeddings Cohere; document loader: Default Data Loader
Services it uses
Scraping pages by hand? Firecrawl is a simpler option (10% off for new users).
Before you upgrade to n8n 3.0
2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:
- HTML Extract: replace with HTML node, 'Extract HTML Content' operation.
- AI Agent v1 (old agent modes) in Question & Answer Retrieve (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| HTML Extract HTML Extract | HTML node, 'Extract HTML Content' operation |
| AI Agent v1 (old agent modes) Question & Answer Retrieve (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (12)
- Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - HTML Extract
n8n-nodes-base.htmlExtract - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - n8n Form Trigger
n8n-nodes-base.formTrigger - HTTP Request
n8n-nodes-base.httpRequest - Convert to File
n8n-nodes-base.convertToFile - Embeddings Cohere
@n8n/n8n-nodes-langchain.embeddingsCohere - AI Agent
@n8n/n8n-nodes-langchain.agent - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
From the author
✅ What problem does this workflow solve? Many websites lack a smart, searchable interface. Visitors often leave due to unanswered questions. This workflow transforms any website into a Retrieval-Augmented Generation (RAG) chatbot—automatically extracting…