Retrieve and Answer Questions from Live Data with AI
Workflow Description
An automation that extracts data from Supabase and Notion, splits it into manageable chunks, converts them to embeddings, and stores them in a vector store. When a user submits a query via chat, it retrieves relevant information and generates accurate answers using OpenAI's language model.
How it works
- 1.Load live data from Supabase and Notion using document loaders
- 2.Split content into logical tokens and organize into batches
- 3.Convert text chunks to vector embeddings via OpenAI
- 4.Store embeddings in a Supabase vector store for fast retrieval
- 5.Receive and process user queries through the chat interface
- 6.Retrieve relevant information and generate answers using retrieval-QA chain
Use cases
- Build an intelligent assistant that answers questions based on your organization's current databases
- Automate customer support by instantly answering queries from internal documentation
- Create a unified search engine across multiple data sources powered by AI
Requirements
- Active OpenAI account with a valid API key for embeddings and chat
- Supabase database with tables for source data and vector store storage
- Notion workspace with pages and databases to index and query
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (34)
Embeddings OpenAI
OpenAI
Token Splitter
Text Splitter Token Splitter
Loop Over Items
Split In Batches
Question and Answer Chain
Chain Retrieval Qa
Vector Store Retriever
Retriever Vector Store
OpenAI Chat Model
OpenAI
When chat message received
Chat Trigger
Schedule Trigger
Schedule Trigger
Sticky Note
Sticky Note
Limit
Limit
Limit1
Limit
Delete old embeddings if exist
Supabase
Get page blocks
Notion
Default Data Loader
Document Default Data Loader
Sticky Note1
Sticky Note
Input Reference
No Op
Notion Trigger
Notion
Get updated pages
Notion
Sticky Note23
Sticky Note
Sticky Note24
Sticky Note
Sticky Note25
Sticky Note
Sticky Note26
Sticky Note
Sticky Note27
Sticky Note
Sticky Note28
Sticky Note
Supabase Vector Store1
Vector Store Supabase
Sticky Note30
Sticky Note
Sticky Note31
Sticky Note
Supabase Vector Store
Vector Store Supabase
Sticky Note32
Sticky Note
Sticky Note29
Sticky Note
Sticky Note33
Sticky Note
Sticky Note34
Sticky Note
Sticky Note35
Sticky Note
Concatenate to single string
Summarize