Data Processing & Analysisintermediate
November 10, 2025
6 min read
40 minutes
Talk with your Drive folder using Pinecone and GPT - n8n Workflow
Build an AI assistant using n8n, Google Drive, OpenAI, and Pinecone to search, read, and answer questions from your documents instantly.
By Kazi Sakib

Ever wished you could simply ask questions about your documents instead of hunting through folders and scrolling through PDFs? You are not alone. We all have mountains of files sitting in Google Drive, and finding specific information feels like looking for a needle in a digital haystack.
This n8n workflow solves exactly that problem. It creates an intelligent AI assistant that reads your Google Drive documents, understands their content, and answers your questions in natural conversation. Think of it as having a personal librarian who has memorized every document you own and can recall any detail instantly.
What You Need Before Getting Started
Building this workflow requires a few tools working together. The good news is that each one plays a specific role in making your AI assistant smart and responsive.
Required APIs and Services
- Google Drive API: This connects n8n to your Google Drive so it can monitor folders and download documents automatically when files are added or updated
- OpenAI API: Powers the language model that generates human-like responses and creates embeddings that help the system understand document content semantically
- Pinecone API: A vector database that stores document embeddings and enables lightning-fast similarity searches when you ask questions
- n8n Instance: The workflow automation platform that orchestrates everything, whether self-hosted or cloud-based
Key Components in This Workflow
- Google Drive Trigger Nodes: Monitor specific folders for new or updated files
- Extract from File Node: Pulls text content from PDFs and other document formats
- Text Splitter: Breaks large documents into manageable chunks for processing
- Embeddings Nodes: Convert text into numerical representations that capture semantic meaning
- Pinecone Vector Store: Stores and retrieves document embeddings efficiently
- Chat Trigger: Creates a public chat interface where users can ask questions
- AI Agent: The brain that understands questions and formulates responses
- Window Buffer Memory: Maintains conversation context across multiple messages
Building Your Document Intelligence System
The workflow is divided into three main sections that work in harmony. The first builds your knowledge base, the second creates a searchable vector store, and the third handles live conversations with users.
Step 1: Set Up Document Monitoring
The workflow starts by watching your Google Drive folders for activity. Two trigger nodes monitor different folders, one for newly created files and another for updated documents. This means your AI assistant stays current automatically without any manual intervention.
img_1.png
When a file appears or changes, n8n downloads it immediately. The workflow is configured to look at specific folders, so you control exactly which documents become part of your AI knowledge base. This keeps sensitive files private while making relevant information accessible.
Step 2: Extract and Process Document Content
Once downloaded, documents flow through an extraction pipeline. The Extract from File node pulls text from PDFs and other formats, turning visual documents into machine-readable content.
Here is where it gets clever. Large documents are split into chunks of 5,000 characters with a 100-character overlap. Why overlap? It ensures that important information spanning chunk boundaries is not lost. The Recursive Character Text Splitter handles this intelligently, preserving context while creating digestible pieces.
Each chunk then passes through the Default Data Loader, which prepares it for the next crucial step: creating embeddings.
Step 3: Create a Searchable Vector Database
This is where the magic happens. The OpenAI text-embedding-3-small model transforms each text chunk into a vector, which is essentially a list of numbers that represents the semantic meaning of the text. Similar concepts have similar vectors, even if the words are different.
These vectors are stored in Pinecone, a purpose-built vector database. Think of it as a specialized filing system where documents are organized not by name or date, but by meaning. When someone asks a question later, the system can find relevant information instantly by comparing vector similarity.
img_2.png
The Pinecone Vector Store node handles both insertion during setup and retrieval during conversations. Your entire document library becomes a searchable knowledge base that understands context and relationships between concepts.
Step 4: Configure the AI Agent
The AI Sales Agent node (despite its name) is the conversational interface of your assistant. It receives questions from users and coordinates with other components to generate answers.
The system prompt is crucial. It defines the assistant's personality and behavior. In this workflow, the agent is instructed to answer factually, admit when it does not know something, and keep responses concise between 100 and 200 words. This creates a helpful, honest assistant that respects your time.
The agent connects to GPT-4.1-mini through the OpenAI Chat Model node, giving it powerful language understanding and generation capabilities. But it does not just make things up. It uses the Vector Store Tool to search your documents before answering.
Step 5: Add Memory and Context
Conversations are not one-off questions. People ask follow-up questions, refer back to previous points, and expect the assistant to remember the discussion.
The Window Buffer Memory node solves this by maintaining conversation history. It uses a session key based on the user ID, so each person gets their own conversation thread. The assistant remembers what was discussed and can reference earlier messages naturally.
This transforms the experience from a simple question-answer tool into a genuine conversation partner that understands context and builds on previous exchanges.
Step 6: Deploy the Chat Interface
The When chat message received trigger creates a public chat interface. Users can access it through a unique webhook URL, type their questions, and receive intelligent responses drawn from your document library.
img_3.png
The interface is simple but powerful. Behind the scenes, every question triggers a semantic search through Pinecone, retrieves relevant document chunks, and feeds them to the AI agent, which synthesizes an answer in plain language.
The system is configured to use the topK parameter, which determines how many relevant document chunks to retrieve for each question. This balances between having enough context and avoiding information overload.
What Makes This Workflow Valuable
The real power becomes clear when you consider the use cases. HR teams can build an assistant that answers employee questions about policies and benefits. Sales teams can create a bot that knows every product specification and case study. Researchers can query their entire library of papers and notes conversationally.
Perhaps most importantly, this workflow keeps your data private. Unlike uploading documents to third-party services, your files stay in your Google Drive. The workflow processes them in your n8n instance and only sends necessary chunks to OpenAI for embedding and response generation.
Start Small, Scale Smart
You can start with a single folder of important documents and expand gradually. Monitor your CV folder first, then add project documentation, then company policies. Each addition makes your AI assistant more knowledgeable and valuable.
This is not just a technical demo. It is a practical solution to information overload that gets more useful every day. Your documents finally become truly searchable, not by keyword matching, but by understanding what you actually mean when you ask a question.
The future of work involves talking to our information instead of hunting for it. This workflow brings that future to your Google Drive today.
Share this article
Help others discover this content
Tap and hold the link button above to access your device's native sharing options
More in Data Processing & Analysis
Continue exploring workflows in this category

Data Processing & Analysisintermediate
1 min read
# Build an AI-Powered Conversational Survey Bot with n8n: Turn Static Forms into Dynamic Interviews
Nayma Sultana
Nov 15
Est: 40 minutes

Data Processing & Analysisintermediate
1 min read
Build an AI-Powered YouTube Parser with n8n
Mahedi Hasan Nadvee
Nov 13
Est: 45 minutes

Data Processing & Analysisadvanced
1 min read
Build a Smart AI Chatbot That Actually Knows Your Documents (Using n8n RAG Workflow)
Nayma Sultana
Nov 13
Est: 1 hour