Skip to content
FlowHubFluxonLab
D
AI Automationfree

Upsert huge documents in a vector store with Supabase and Notion

by Marioadapted from n8n official workflow galleryUpdated Aug 2026
RequiresDDefault Data LoaderEmbeddings OpenAIEmbeddings OpenAINotionNotionOpenAI Chat ModelOpenAI Chat ModelQuestion and Answer ChainQuestion and Answer ChainSupabaseSupabaseSupabase Vector StoreSupabase Vector StoreToken SplitterToken SplitterVector Store RetrieverVector Store Retriever
Share Post Share
Embeddings OpenAIEmbeddings Open…TSToken SplitterSILoop Over ItemsCRQuestion and Answer ChainQuestion and An…RVVector Store RetrieverVector Store Re…OpenAI Chat ModelOpenAI Chat Mod…ChWhen chat message receivedWhen chat messa…ScSchedule TriggerLiLimitLiLimit1Delete old embeddings if existDelete old embe…Get page blocksDDDefault Data LoaderDefault Data Lo…NOInput ReferenceNotion TriggerGet updated pagesGet updated pag…VSSupabase Vector Store1Supabase Vector…VSSupabase Vector StoreSupabase Vector…SuConcatenate to single stringConcatenate to …12345678910111213141516171819
1/5
STEPS · 19
Starts from a chat message

Purpose This workflow adds the capability to build a RAG on living data. In this case Notion is used as a Knowledge Base. Whenever a page is updated, the embeddings get upserted in a Supabase Vector Store. It can also be fairly easily adapted to PGVector, Pinecone, or Qdrant by using a custom HTTP request for the latter two. Demo How it works A trigger checks every minute for changes in the Notion Database. The manual polling approach improves accuracy and prevents changes from being lost between cached polling intervals. Afterwards every updated page is processed sequentially The Vector Database is searched using the Notion Page ID stored in the metadata of each embedding. If old entries exist, they are deleted. All blocks of the Notion Database Page are retrieved and combined into a single string The content is embedded and split into chunks if necessary. Metadata, including the Notion Page ID, is added during storage for future reference.

Tags

n8nreference-onlychain-retrieval-qadocument-default-data-loaderembeddings-open-ailm-chat-open-ainotionretriever-vector-storesupabasetext-splitter-token-splittervector-store-supabase
Connects
DDefault Data LoaderembeddingsopenaiEmbeddings OpenAInotionNotionopenaichatmodelOpenAI Chat ModelquestionandanswerchainQuestion and Answer ChainsupabaseSupabase
CategoryAI Automation
Triggermanual
Complexityadvanced
Nodes19
AddedNov 24, 2024

Related workflows

See all AI Automation
binaryinputloaderembeddingsopenaigoogledriveopenaichatmodel
free

Ask questions about a PDF using AI

The workflow first populates a Pinecone index with vectors from a Bitcoin whitepaper. Then, it waits for a manual chat message. When received, the chat message is turned into a vector and compared to the vectors in Pinecone. The most similar vectors are retrieved and passed to OpenAI for generating a chat response. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by David Roberts
Dgoogledriveopenaichatmodelsummarizationchain
free

Load and summarize Google Drive files with AI

This workflow includes advanced features like text summarization and tokenization, it's ideal for automating document processing tasks that require parsing and summarizing text data from Google Drive. To use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team
DhtmlWopenaichatmodel
free

Scrape and summarize webpages with AI

This workflow integrates both web scraping and NLP functionalities. It uses HTML parsing to extract links, HTTP requests to fetch essay content, and AI-based summarization using GPT-4o. It's an excellent example of an end-to-end automated task that is not only efficient but also provides real value by summarizing valuable content. Note that to use this template, you need to be on n8n version 1.50.0 or later.

by n8n Team