Automated Storage of Notion Pages as Vector Embeddings in Supabase

somdn_product_page

This workflow streamlines the process of storing Notion pages as vector embeddings within a Supabase database, facilitating advanced search and retrieval capabilities. When a new page is added to a designated Notion database, the workflow automatically retrieves its content, filters out media blocks, and concatenates the text for analysis. It then generates embeddings using OpenAI’s API and stores both the textual data and vectors into Supabase, along with relevant metadata such as page ID and creation time. This automation is ideal for teams aiming to create a searchable knowledge base or AI-powered content repository from their Notion workspace.

**Steps Breakdown:**

1. A Notion trigger monitors for new pages added to a specific database.

2. The workflow fetches all block content of the new page.

3. It filters out image and video blocks, keeping only textual content.

4. The text blocks are concatenated into a single string for processing.

5. Metadata, including page ID and title, is created and attached.

6. The combined text content is split into manageable chunks.

7. Embeddings are generated for each text chunk using OpenAI.

8. All data, including chunks, embeddings, and metadata, are stored in Supabase, with the vector representation stored in a dedicated column.

**Use Cases:**

– Building a searchable document repository from Notion.

– Enhancing knowledge management with AI-powered semantic search.

– Automating the creation of vector-based content databases for AI applications.

Node Count

6 – 10 Nodes

Nodes Used

@n8n/n8n-nodes-langchain.documentDefaultDataLoader, @n8n/n8n-nodes-langchain.embeddingsOpenAi, @n8n/n8n-nodes-langchain.textSplitterTokenSplitter, @n8n/n8n-nodes-langchain.vectorStoreSupabase, filter, notion, notionTrigger, stickyNote, summarize

Reviews

There are no reviews yet.

Be the first to review “Automated Storage of Notion Pages as Vector Embeddings in Supabase”

Your email address will not be published. Required fields are marked *