Notion to Supabase pgvector live RAG synchronisation workflow
This n8n workflow maintains a live RAG knowledge base for teams storing internal documentation in Notion. Whenever a page is updated, old embeddings for that page are removed from Supabase before the fresh text is token-split and re-indexed. Staff chat queries therefore retrieve only current documentation rather than conflicting historical versions.
- Catalogue ID
- #1527
- Functional nodes
- 19
- Connections
- 19
- Trigger
- chatTrigger, scheduleTrigger, notionTrigger
- AI layer
- AI-assisted
Business problem solved
Many internal RAG prototypes break down after week one because Notion pages evolve while outdated embeddings pile up in the vector table. Retrieving two contradictory policy versions destroys team confidence in the assistant.
Trigger
A Notion trigger watches page edits, a schedule trigger runs periodic sweeps and a chat trigger serves team queries.
Connected systems
- Notion
- Supabase pgvector
- OpenAI
- Chat interface
- Self-hosted n8n
Every workflow is deployed on your own server with documentation, a run log and an error queue.
Workflow steps
- 01
Notion page change capture
Notion and scheduled triggers detect modified workspace pages and pull their updated blocks.
- 02
Stale embedding removal
Previous vector rows matching the edited page ID are deleted from Supabase before new chunks are written.
- 03
Token splitting and pgvector upsert
Updated page content is split by token count, embedded via OpenAI and stored cleanly in Supabase pgvector.
- 04
Live retrieval Q&A
Incoming chat questions retrieve matching chunks and summarise answers grounded solely in the current Notion pages.
Error queue and human approval
Built-in state in the catalogue workflow
The verified catalogue workflow contains zero node-level error flags, while its explicit delete-old-embeddings step prevents stale-index drift by design.
Production layer added by ALTAI
During live deployment, ALTAI adds index-refresh failure alerts, a missing-source notification queue, workspace permission filters and a synchronisation run log.
Notion to Supabase live RAG sync workflow Frequently asked questions
Depending on your configured Notion trigger and sweep interval, updated pages are purged and re-indexed within minutes.
Without deleting prior chunks, vector search returns both old and updated rules side by side and produces contradictory answers.
Yes. Integration permissions are scoped strictly to the exact Notion databases and pages approved during discovery.
Yes. We deploy against EU-hosted Supabase projects or a self-hosted PostgreSQL instance with pgvector.
Related n8n workflows
Google Drive company docs RAG workflow
Chunks new or updated Google Drive company files into a Pinecone vector index and serves grounded internal chat answers with memory.
Natural language to SQL for PostgreSQL workflow
Caches your PostgreSQL schema locally, generates SQL through a local Ollama model and executes valid queries with built-in error protection.
WooCommerce AI product advisor workflow
Combines Qdrant store policy and catalogue knowledge with live WooCommerce product and order tools to answer shopper questions accurately.

We write the proposal after we have found the problem together
In a thirty-minute call we listen to how you work and talk through where time and customers are slipping away. If you do not need a digital fix, we will tell you that too.
30 minutes · no preparation needed
The call and the week of discovery are both free.Read the terms