At a glance
- Trigger
- Notion Trigger (Notion - Page Added Trigger)
- Nodes
- 8
- Apps
- OpenAI, Notion and Supabase
- AI nodes
- 4
- Credentials
- None
- Category
- RAG, documents and vector search
Apps and integrations
Node types used
Setup notes
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
Store Notion's Pages as Vector Documents into Supabase
This workflow assumes you have a Supabase project with a table that has a vector column. If you don't have it, follow the instructions here: Supabase Vector Columns Guide
Workflow Description
This workflow automates the process of storing Notion pages as vector documents in a Supabase database with a vector column. The steps are as follows
- Notion Page Added Trigger
- Monitors a specified Notion database for newly added pages. You can create a specific Notion database where you copy the pages you want to store in Supabase.
- Node: Page Added in Notion Database
- Retrieve Page Content
- Fetches all block content from the newly added Notion page.
- Node: Get Blocks Content
- Filter Non-Text Content
- Excludes blocks of type "image" and "video" to focus on textual content.
- Node: Filter - Exclude Media Content
- Summarize Content
- Concatenates the Notion blocks content to create a single text for embedding.
- Node: Summarize - Concatenate Notion's blocks content
- Store in Supabase
- Stores the processed documents and their embeddings into a Supabase table with a vector column.
- Node: Store Documents in Supabase
- Generate Embeddings
- Utilizes OpenAI's API to generate embeddings for the textual content.
- Node: Generate Text Embeddings
- Create Metadata and Load Content
- Loads the block content and creates associated metadata, such as page ID and block ID.
- Node: Load Block Content & Create Metadata
- Split Content into Chunks
- Divides the text into smaller chunks for easier processing and embedding generation.
- Node: Token Splitter
Nodes in this workflow
The 8 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
- Embeddings OpenAI (OpenAI Embeddings)
- Token Splitter (Token Splitter)
- Notion - Page Added Trigger (Notion Trigger)
- Notion - Retrieve Page Content (Notion)
- Filter Non-Text Content (Filter)
- Summarize - Concatenate Notion's blocks content (Summarize)
- Create metadata and load content (Default Data Loader)
- Supabase Vector Store (Supabase Vector Store)
Credentials you need
The workflow JSON lists no credentials. Nodes that call external services may still need credentials after you import it.
How to import into n8n
- Download the JSON file with the button above.
- In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
- Open each node that shows a warning and select or create its credential.
- Read the notes on the canvas, test the workflow with sample data, then activate it.
Do you need somewhere to run it? Read our guide to self-hosted n8n.