Knowledge Base Sync: Notion to Pinecone Vector Store Integration - n8n Workflow

Use this powerful n8n workflow to automatically sync Notion database pages to a Pinecone vector store using Gemini embeddings. Essential n8n templates for building real-time RAG systems.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • AI/ML developers requiring a live synchronization pipeline for RAG knowledge bases.

  • Content Managers who use Notion as their source of truth and need real-time vector indexing.

  • n8n specialists looking for advanced n8n templates involving vector databases and large language models.

  • Users seeking an automated process to keep Pinecone indexes fresh whenever a new page is created in Notion.

Overview

Maintaining a current and accurate knowledge base is critical for high-performance Retrieval-Augmented Generation (RAG) applications. This sophisticated n8n workflow provides a fully automated pipeline to ensure that any new page added to a specified Notion database is instantly processed, converted into vectors, and stored in a Pinecone index.

This n8n template utilizes powerful LangChain integrations for text splitting and embedding generation via Google Gemini, ensuring dimension 768 vector output suitable for modern RAG architectures. By leveraging the low-code power of n8n, developers can deploy a robust indexing service without needing complex custom middleware. This reliable n8n node configuration significantly reduces latency and manual effort associated with updating your vector store.

How it Works

This n8n workflow initiates its process using a dedicated n8n trigger.


  1. Trigger and Retrieval: The Notion - Page Added Trigger acts as the starting point, listening for new pages created in a specified Notion database. Once triggered, the n8n workflow immediately fetches the full block content using the Notion - Retrieve Page Content n8n node.

  2. Data Cleaning: The flow proceeds to the Filter Non-Text Content n8n node, which ensures only relevant textual information is processed by explicitly removing blocks identified as 'image' or 'video'.

  3. Concatenation and Preparation: The filtered content blocks are then consolidated into a single document string using the Summarize - Concatenate Notion's blocks content n8n node.

  4. Document Loading and Metadata: The Create metadata and load content n8n node prepares the document. It attaches crucial metadata (Page ID, Created Time, Page Title) pulled from the original n8n trigger event, alongside the concatenated content.

  5. Chunking: The document is prepared for optimal embedding via the Token Splitter n8n node. This essential RAG preparation step ensures chunks are manageable (256 tokens, 30 overlap) for vector creation.

  6. Embedding Generation: The prepared chunks are passed to the Embeddings Google Gemini n8n node, which uses the specified embedding model (models/text-embedding-004) to generate dense, 768-dimensional vector representations.

  7. Vector Insertion: Finally, the generated vectors, along with their associated metadata, are inserted into the designated 'notion-pages' index in the Pinecone Vector Store using the dedicated n8n node. This completes the automatic synchronization implemented by this complex n8n workflow.

Installation Guide

To install and utilize this n8n workflow, follow these steps:


  1. Import: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' feature.

  2. Credentials Setup:

Notion: Configure your Notion API credentials (Auto: Notion). Ensure the integration has access to the database specified in the n8n trigger n8n node.
Google Gemini: Set up credentials for the Google Gemini (PaLM) Api account to enable vector embedding generation.
* Pinecone: Configure the Auto: PineconeApi credentials, ensuring you specify the correct Pinecone environment and API key.

  1. Configuration: Verify the Notion - Page Added Trigger n8n node points to the correct database ID (currently set to 17b11930-c10f-8000-a545-ece7cade03f9).

  2. Activation: Once credentials and configurations are verified, activate the n8n workflow by toggling the 'Active' switch.

Node Details


  • Notion - Page Added Trigger (n8n trigger):

- Function: Starts the n8n workflow when a new item is added to the specified Notion database ('Embeddings').
- Key Configuration: Polls every minute (everyMinute).

  • Notion - Retrieve Page Content (n8n node):

- Function: Retrieves all blocks (content) from the Notion page identified by the trigger.
- Key Configuration: Uses expression ={{ $json.url }} to dynamically fetch content based on the triggered page URL.

  • Filter Non-Text Content (n8n node):

- Function: Cleans the data stream, excluding blocks where the type is 'image' or 'video', focusing only on text data.
- Key Configuration: Two conditions set to notEquals operator for 'image' and 'video'.

  • Summarize - Concatenate Notion's blocks content (n8n node):

- Function: Aggregates all remaining text blocks into a single string, separated by newlines, preparing a cohesive document for embedding.
- Key Configuration: Aggregation is 'concatenate' on the content field.

  • Token Splitter (n8n node):

- Function: Defines the text splitting strategy used by the document loader to chunk the content into smaller segments.
- Key Configuration: Chunk Size 256, Chunk Overlap 30.

  • Create metadata and load content (n8n node):

- Function: Structures the document, applying the splitter configuration, and attaching dynamic metadata from the n8n trigger payload (pageId, createdTime, pageTitle).

  • Embeddings Google Gemini (n8n node):

- Function: Generates vector embeddings for each text chunk.
- Key Configuration: Model set to models/text-embedding-004.

  • Pinecone Vector Store (n8n node):

- Function: Executes the final insertion of vectors and metadata into the Pinecone index.
- Key Configuration: Mode is 'insert', targeting the index named 'notion-pages'.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

Hi, I’m Udit, an Acquia-certified developer with a strong background in web development and creating enterprise solutions. Recently, I’ve transitioned into AI and ML, I hold DIAT Professional AI Certification. I specialize in building AI-driven automation to streamline workflows, improve efficiency, and solve complex problems. With expertise in AI/ML tools and years of experience in Acquia and Drupal, I’m passionate about leveraging tech to drive innovation and create smarter solutions.

Featured*