Animated data flow diagram

AI Agent: Automated Notion Content Ingestion to Vector Store (Gemini & Pinecone)

Version: 1.0.0 | Last Updated: 2025-05-16

Integrates with:

Notion Google Gemini Pinecone

Overview

Unlock AI-Powered Knowledge Management with this Agent

This n8n workflow acts as an AI Agent to keep your Pinecone vector store automatically synchronized with your Notion database. When a new page is added in Notion, this agent extracts its text content, generates powerful embeddings using Google Gemini's 'models/text-embedding-004' model, and stores these vectors in Pinecone. This enables you to build sophisticated RAG (Retrieval Augmented Generation) applications, semantic search capabilities, or other LLM-powered features on top of your Notion knowledge base.

Key Features & Benefits

  • Automated Ingestion: Triggers automatically when new pages are added to a specified Notion database.
  • Content Processing: Retrieves full page content from Notion and filters out non-textual blocks (like images and videos) to focus on meaningful text.
  • Intelligent Text Chunking: Utilizes a token-based text splitter (chunk size 256, overlap 30) to prepare content optimally for embedding.
  • Advanced AI Embeddings: Leverages Google Gemini ('models/text-embedding-004') to create high-quality, 768-dimension text embeddings.
  • Vector Storage: Seamlessly inserts documents and their embeddings into your designated Pinecone index.
  • Customizable Metadata: Enriches vectors with metadata like page ID, creation time, and page title for better filtering and context.
  • Foundation for AI Apps: Perfect for building internal search tools, AI assistants, or customer-facing Q&A systems based on your Notion data.

Use Cases

  • B2B SaaS: Automatically build and maintain a comprehensive knowledge base from Notion for AI-powered customer support bots, reducing ticket volume and improving response times.
  • B2C E-commerce: Ingest product specifications and FAQs from Notion into a vector store to power an intelligent product recommendation engine or a semantic search on the e-commerce site, enhancing user experience.
  • Solopreneurs/Founders: Create a dynamic 'second brain' by vectorizing all Notion notes, enabling quick, intelligent retrieval of past ideas, research, and project details for faster decision-making.
  • CTOs/Heads of Automation: Streamline internal documentation search by feeding company wikis and technical documents from Notion into a vector database for quick and accurate information retrieval by engineering and other teams.

Prerequisites

  • An n8n instance (Cloud or self-hosted).
  • Notion API credentials with access to the target database.
  • Google Cloud Project with Vertex AI API enabled, or a Google AI Studio API key, providing access to Google Gemini embedding models (e.g., 'models/text-embedding-004').
  • Pinecone API Key, Pinecone environment, and an existing Pinecone index configured with 768 dimensions (to match 'models/text-embedding-004').

Setup Instructions

  1. Download the n8n workflow JSON file.
  2. Import the workflow into your n8n instance.
  3. Configure the 'Notion - Page Added Trigger' node: Select your Notion credentials and specify the Database ID of the Notion database you want to monitor.
  4. In the 'Notion - Retrieve Page Content' node, ensure your Notion credentials are correctly selected.
  5. Configure the 'Embeddings Google Gemini' node: Enter your Google Gemini API credentials. Ensure the model selected is 'models/text-embedding-004'.
  6. Configure the 'Pinecone Vector Store' node: Enter your Pinecone API Key, Environment, and specify the Pinecone Index name. This index must already exist and be configured for 768-dimension vectors (compatible with the Gemini model used).
  7. Review the 'Token Splitter' node parameters (default: chunkSize 256, chunkOverlap 30) and adjust if necessary for your content.
  8. The 'Create metadata and load content' node is pre-configured to extract pageId, createdTime, and pageTitle. Customize if you need different metadata.
  9. Activate the workflow. New pages added to your specified Notion database will now be automatically processed and vectorized into Pinecone.

Tags:

AI AgentAutomationNotionPineconeGoogle GeminiVector StoreRAGKnowledge ManagementEmbeddings

Want your own unique AI agent?

Talk to us - we know how to build custom AI agents for your specific needs.

Schedule a Consultation