Automate Notion Content to Vector Store Using n8n

Discover how to automate extracting and embedding Notion page content into a Pinecone vector store using n8n. This workflow saves hours by converting rich Notion data into searchable embeddings seamlessly.
notionTrigger
notion
textSplitterTokenSplitter
+5
Workflow Identifier: 1109
NODES in Use: Notion Trigger, Notion, Filter, Summarize, Token Splitter, Document Default Data Loader, Embeddings Google Gemini, Vector Store Pinecone
Automate Notion to Vector Store with n8n

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Workflow Does

This workflow watches for new pages added in a Notion database.

It pulls out text content from these pages, cleans and splits the text, and then turns the text into number vectors.

After that, all vectors with useful info about the page get saved in a Pinecone vector index.

This gives a quick searchable database of all Notion page content for smart AI search later.

Who Should Use This Workflow

This is useful for anyone who uses Notion a lot to store notes or documents.

If teams find it hard to find info quickly because they have many pages, this workflow helps.

It is made for users who want to keep making content in Notion without extra manual work to organize or summarize.

Tools and Services Used

  • n8n: Platform to automate workflow steps.
  • Notion API: To detect new pages and get page content.
  • Google PaLM API (Google Gemini): To create text embeddings, representing meaning as numbers.
  • Pinecone: Cloud vector database to store and search embeddings by similarity.
  • Langchain Integration in n8n: To split large text and add metadata.

Inputs, Processing Steps, and Output

Inputs

Notion database receives new pages.

API credentials for Notion, Google PaLM, and Pinecone are needed.

Processing Steps

  • Detect when a new Notion page appears.
  • Get all content blocks on that page.
  • Remove blocks that are images or videos, keeping only text.
  • Join all text blocks into one big text.
  • Split big text into parts around 256 tokens each, keeping a bit of overlap.
  • Add metadata like page ID, title, and creation date to each part.
  • Send each text part to Google Gemini to create an embedding vector.
  • Save all embedding vectors and metadata in Pinecone index called “notion-pages”.

Output

A Pinecone vector index filled with vectors that represent Notion pages.

This vector store helps find relevant information fast using semantic search.

Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open the n8n editor where you want to run the workflow.
  3. Choose “Import from File” and select the downloaded workflow file.

Step 2: Add Credentials and Settings

  1. Go to credential settings and add your Notion API Key and database ID.
  2. Enter Google PaLM API Key for embedding generation.
  3. Connect to your Pinecone account and choose the index named “notion-pages” or update if named differently.

Step 3: Test the Workflow

  1. Trigger the workflow manually or add a new page in your Notion database to test.
  2. Check if all steps run without errors and vectors get added to Pinecone.

Step 4: Activate for Production

  1. Turn on the workflow toggle in n8n to run automatically every minute.
  2. Watch for any errors in execution and fix if needed.

If self hosting n8n, check links to manage the server securely and with uptime: self-host n8n.

Customization Ideas

  • Change token chunk size in token splitting node to make bigger or smaller text parts.
  • Add more metadata like author or tags in metadata node to improve search filters.
  • Try different embedding models that work with Langchain if you want.
  • Filter out other block types like files or audio if not needed.
  • Use a different Pinecone index name if managing multiple projects.

Common Problems and How to Fix Them

Problem: No data from Notion Retrieve node

Cause: API credentials missing rights or wrong blockId expression.

Fix: Make sure Notion app has permission. Use expression code exactly as {{$json["url"]}} for blockId.

Problem: Embeddings generation fails or empty

Cause: Wrong Google PaLM API key or model name set incorrectly.

Fix: Check API key is correct. Use model name models/text-embedding-004.

Problem: Pinecone vectors not inserting

Cause: Pinecone API key or index name wrong, or index not ready.

Fix: Confirm Pinecone API key, index name spelling, and index is active.

Summary of Results

✓ Automatic detection of new Notion pages for vector conversion.

Text content extracted, cleaned, split, and enriched with metadata.

✓ High quality embeddings created with Google Gemini.

✓ Vectors stored in Pinecone for speedy semantic search.

→ Less manual work and faster access to important Notion information.


Automate Notion to Vector Store with n8n

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

The workflow uses the Notion Trigger node to watch for any new page added in a specified Notion database.
Text blocks are filtered, combined, split into chunks, enriched with metadata, and then sent to Google Gemini to create embeddings.
Pinecone stores the embedding vectors and metadata to enable fast semantic search on the Notion page content.
Add required API credentials, update database and index IDs, test the workflow by triggering it, and then activate it for automatic running.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.