Description
Overview
This Store Notion’s Pages as Vector Documents into Supabase workflow automates the transformation of newly added Notion pages into vector documents for storage. This automation workflow integrates no-code integration techniques to monitor Notion databases, extract textual content, and generate vector embeddings for semantic search in a Supabase vector column.
Designed for knowledge management and data engineering professionals, the workflow triggers on new page additions in Notion, using the Notion Page Added Trigger node to initiate content extraction and embedding storage. It offers a deterministic pipeline for converting unstructured page data into structured vectorized documents.
Key Benefits
- Automatically detects newly added Notion pages every minute for real-time processing.
- Excludes non-textual content by filtering out image and video blocks for focused embedding.
- Generates semantic vector embeddings using OpenAI’s API for enhanced content representation.
- Stores vectorized documents with metadata in Supabase’s vector column for efficient retrieval.
- Splits large text into overlapping chunks to optimize embedding quality and processing.
Product Overview
This automation workflow begins with a scheduled polling trigger that monitors a specified Notion database for newly added pages. Upon detecting a new page, it retrieves the full block content of that page using the Notion – Retrieve Page Content node. The workflow then filters out media content such as images and videos to isolate only text-based blocks for embedding. These textual blocks are concatenated into a single continuous string and enriched with page metadata, including page ID, creation time, and title. The concatenated content is subsequently split into 256-token chunks with 30-token overlaps using the Token Splitter node to manage token limits and preserve semantic coherence.
The workflow then sends each chunk to the OpenAI Embeddings node to generate vector embeddings that capture semantic meaning. These embeddings, along with the associated metadata, are inserted into a Supabase table configured with a vector column via the Supabase Vector Store node. This synchronous queue-based orchestration pipeline does not include explicit error backoff or retry mechanisms, relying on platform default error handling. Security is maintained through credentialed access to Notion, OpenAI, and Supabase APIs, ensuring no persistent storage outside the configured Supabase vector database.
Features and Outcomes
Core Automation
The workflow processes new Notion pages by extracting and concatenating textual content, applying deterministic filtering to exclude media blocks. It uses a token-based text splitter to segment content before vectorizing, an approach typical in event-driven analysis pipelines.
- Single-pass evaluation ensures each page is processed once per trigger event.
- Chunk overlap preserves context across tokenized segments for embedding consistency.
- Deterministic filtering excludes images and videos, focusing on textual data.
Integrations and Intake
Integrates three core APIs: Notion for page content intake via OAuth credentials, OpenAI for semantic embedding generation using API keys, and Supabase for vector document data storage. The Notion trigger polls every minute for new pages, requiring a configured database ID.
- Notion API: Monitors database additions and retrieves full block content.
- OpenAI API: Generates vector embeddings for text chunks.
- Supabase API: Inserts vectors and metadata into a vector-enabled table.
Outputs and Consumption
The workflow outputs structured vector documents stored in Supabase, enabling downstream semantic search or AI retrieval. Data is stored asynchronously, with embeddings linked to metadata fields such as pageId, createdTime, and pageTitle.
- Output format: Vector embeddings stored in Supabase vector column.
- Metadata includes Notion page identifiers and timestamps for traceability.
- Supports efficient similarity queries based on stored vector data.
Workflow — End-to-End Execution
Step 1: Trigger
The workflow initiates via the Notion – Page Added Trigger node, which polls the specified Notion database every minute to detect new page additions. This trigger outputs the new page’s ID and URL to begin content extraction.
Step 2: Processing
Using the page URL, the Notion – Retrieve Page Content node fetches all child blocks. The Filter Non-Text Content node then excludes blocks typed as “image” or “video,” allowing only textual data to proceed. The remaining blocks are concatenated into a single text string for embedding preparation.
Step 3: Analysis
The concatenated text is split into chunks of 256 tokens with a 30-token overlap by the Token Splitter node. Each chunk is fed into the Embeddings OpenAI node, which generates vector embeddings representing semantic content. Metadata including page ID, creation time, and title is attached for each document.
Step 4: Delivery
The Supabase Vector Store node writes the vector embeddings and metadata into a Supabase table with a vector column. This insertion is performed asynchronously, enabling efficient storage and subsequent vector similarity search capabilities within Supabase.
Use Cases
Scenario 1
Knowledge managers needing semantic search for company documents face challenges with unstructured Notion pages. This workflow automates extraction and vectorization of text, enabling Supabase-powered similarity search. The result is a searchable vector database that returns relevant documents based on semantic queries.
Scenario 2
Data engineers require automated ingestion of Notion content into vector databases for AI applications. This orchestration pipeline extracts, filters, and chunks page content before generating embeddings and storing them in Supabase. It produces structured vector documents ready for content recommendation systems.
Scenario 3
Teams maintaining extensive Notion documentation seek automated archival with semantic indexing. This automation workflow captures new pages, excludes media, and indexes text as vectors with metadata. The output supports efficient retrieval and contextual understanding within Supabase.
How to use
To deploy this workflow, import it into your n8n instance and configure credentials for Notion, OpenAI, and Supabase. Set the Notion database ID to monitor new pages. Ensure your Supabase table includes a vector column compatible with the stored embeddings. Once configured, activate the workflow to enable minute-by-minute polling and automatic processing. Expect vector documents with metadata to appear in Supabase shortly after new Notion pages are added.
Comparison — Manual Process vs. Automation Workflow
| Attribute | Manual/Alternative | This Workflow |
|---|---|---|
| Steps required | Multiple manual steps including export, filtering, chunking, embedding, and storage. | Fully automated end-to-end processing triggered by page addition. |
| Consistency | Subject to human error in content filtering and embedding generation. | Deterministic filtering and chunking ensure consistent vector document creation. |
| Scalability | Limited by manual throughput and human resource availability. | Scales with API throughput and Supabase table capacity without manual intervention. |
| Maintenance | High due to manual updates and error handling. | Low, relying on credential updates and platform API stability. |
Technical Specifications
| Environment | n8n automation platform with access to Notion, OpenAI, and Supabase APIs |
|---|---|
| Tools / APIs | Notion API, OpenAI Embeddings API, Supabase vector database API |
| Execution Model | Event-driven polling trigger with asynchronous embedding generation and storage |
| Input Formats | Notion page blocks in JSON format |
| Output Formats | Vector embeddings with JSON metadata stored in Supabase vector column |
| Data Handling | Text content extracted, filtered, concatenated, chunked, embedded, and stored |
| Known Constraints | Requires Supabase table with vector column and configured Notion database ID |
| Credentials | OAuth for Notion, API key for OpenAI, credential-based access for Supabase |
Implementation Requirements
- Configured Notion database with pages to monitor and OAuth credentials for API access.
- Supabase project with a table including a vector column prepared for embedding storage.
- OpenAI API key with permissions for embedding generation.
Configuration & Validation
- Set the Notion database ID in the trigger node and verify OAuth credentials are active.
- Confirm the Supabase table exists with a vector column and connection credentials are valid.
- Test workflow execution by adding a new page in Notion and verify vectors appear in Supabase.
Data Provenance
- Trigger node: Notion – Page Added Trigger monitors new page events.
- Processing nodes: Notion content retrieval, Filter Non-Text Content, Summarize – Concatenate Notion’s blocks content.
- Embedding generation: Embeddings OpenAI node; storage via Supabase Vector Store node with metadata from Create metadata and load content node.
FAQ
How is the Store Notion’s Pages as Vector Documents automation workflow triggered?
The workflow is triggered by the Notion – Page Added Trigger node, which polls a specified Notion database every minute to detect newly added pages.
Which tools or models does the orchestration pipeline use?
This orchestration pipeline uses the Notion API for content intake, OpenAI’s API for generating vector embeddings, and Supabase for storing vector documents with metadata.
What does the response look like for client consumption?
Clients receive vector embeddings stored in Supabase along with associated metadata fields such as pageId, createdTime, and pageTitle, enabling semantic search and retrieval.
Is any data persisted by the workflow?
Only processed vector embeddings and metadata are persisted in the Supabase database; transient data during processing is not stored permanently outside this vector store.
How are errors handled in this integration flow?
Error handling relies on n8n’s platform defaults; the workflow does not implement explicit retry or backoff mechanisms within the nodes.
Conclusion
This automation workflow offers a reliable method to convert newly added Notion pages into vector documents stored in Supabase, enabling semantic search and AI-powered retrieval. By filtering non-text content and chunking textual data, it ensures embedding quality and consistent metadata association. It relies explicitly on the availability of Notion, OpenAI, and Supabase APIs, requiring proper credential configuration. The workflow’s deterministic process reduces manual intervention, supporting scalable knowledge management solutions with structured, searchable vector data.








Reviews
There are no reviews yet.