n8n

How to Index Notion to Supabase Vector Search?

New pages in your Notion database become AI ready records in Supabase. The flow cleans, splits, and embeds the text so your team can power fast search or a chat bot over your knowledge. It fits knowledge bases, support guides, handbooks, and meeting notes.

When a page is added in Notion, the run starts. It fetches all blocks from the page, removes images and videos, and concatenates the remaining text into one body. The content gets metadata like page id and created time, then it is split into 256 token chunks with a 30 token overlap for better recall. OpenAI creates embeddings for each chunk, and the workflow inserts both text, vectors, and metadata into your Supabase table that has a vector column. This design keeps storage lean and makes search results more accurate.

Connect Notion, OpenAI, and Supabase, and point the trigger to the Notion database you use for source content. Prepare a Supabase table with a vector column, then map the table name in the node. Teams usually cut manual copy work to near zero and keep indexing current within minutes. Use it for policy search, engineering docs, product updates, or FAQ libraries. No coding is needed once connections are set.

What are the key features?

  • Listens for new pages in a selected Notion database and starts the run automatically.
  • Retrieves all page blocks and keeps only text content for clean inputs.
  • Concatenates the blocks into one body to prepare for chunking and embeddings.
  • Adds metadata such as page id and created time to every document chunk.
  • Splits text into 256 token chunks with a 30 token overlap to boost recall.
  • Generates vector embeddings using OpenAI for each chunk.
  • Writes text, vectors, and metadata into a Supabase table with a vector column.
  • Configurable chunk size and overlap to match your content style.

What are the benefits?

  • Reduce manual work from 60 minutes to 2 minutes per page
  • Automate over 90 percent of indexing steps from Notion to Supabase
  • Improve data consistency by eliminating copy and paste errors
  • Handle 10 times more pages with chunking and batching
  • Connect Notion and Supabase seamlessly for AI search

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Notion, OpenAI and Supabase. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, open the Notion nodes and create a new Notion credential. Follow the on screen instructions to connect your Notion workspace.
  4. In Notion, share the source database with the integration you created so the workflow can read new pages.
  5. Open the Notion Page Added Trigger node and select your Notion credential. Choose the database to watch and keep the polling set to every minute.
  6. Check the Notion Retrieve Page Content node. The block id expression that uses the page URL is already set. Leave it as is.
  7. Review the Filter Non Text Content node. Confirm that image and video types are excluded so only text is processed.
  8. Create an OpenAI credential in n8n. Click the Embeddings node, choose Create new credential, and paste your OpenAI API key from the OpenAI account API page.
  9. Prepare Supabase: create a table with columns for text content, metadata, and a vector column sized for your chosen OpenAI embedding model. Enable the vector extension if needed in your project.
  10. In the Supabase Vector Store node, create a new Supabase credential with your project URL and key. Set the table name and map any column settings the node requires.
  11. Run a test: add a new page to the connected Notion database. Wait a minute, then open Executions in n8n to confirm a successful run. Check your Supabase table for new rows with vectors.
  12. Troubleshoot issues: if no run appears, confirm the Notion database is shared with the integration and the correct database is selected. If rows are missing vectors, verify the OpenAI key and table vector column type. Adjust chunk size or overlap if your content is very short or very long.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Notion

Sign up

Free plan: $0 per member / mo (Public API included)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Supabase

Sign up

Free: $0 / mo — unlimited API requests; 500 MB database; 5 GB bandwidth; 1 GB storage; 50,000 MAUs.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.