Create a knowledge base chatbot with Google Drive & GPT-4o using vector search
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (14)
- Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Simple Vector Store
@n8n/n8n-nodes-langchain.vectorStoreInMemory - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Vector Store Question Answer Tool
@n8n/n8n-nodes-langchain.toolVectorStore - Google Drive
n8n-nodes-base.googleDrive - Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - AI Agent
@n8n/n8n-nodes-langchain.agent - HTTP Request
n8n-nodes-base.httpRequest - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow
What it does
Template: Create an AI Knowledge Base Chatbot with Google Drive and OpenAI GPT (Venio/Salesbear) π Template Overview This comprehensive n8n workflow template creates an intelligent AI chatbot that automatically transforms your Google Drive documents into a searchable knowledge base. The chatbot uses OpenAI's GPT models to provide accurate, context-aware responses based exclusively on your uploaded documents, making it perfect for customer support, internal documentation, and knowledge management systems. π― What This Template Does Automated Knowledge Processing - Real-time Document Monitoring: Automatically detects when files are added or updated in your designated Google Drive folder - Intelligent Document Processing: Converts PDFs, text files, and other documents into searchable vector embeddings - Smart Text Chunking: Breaks down large documents into optimally-sized chunks for better AI comprehension - Vector Storage: Creates a searchable knowledge base that the AI can query for relevant information AI-Powered Chat Interface - Webhook Integration: Receives questions via HTTP requests from any external platform (Venio/Salesbear) - Contextual Responses: Maintains conversation history for natural, flowing interactions - Source-Grounded Answers: Provides responses based strictly on your document content, preventing hallucinations - Multi-platform Support: Works with any chat platform that can send HTTP requests π§ Pre-conditions and Requirements Required API Accounts and Permissions 1. Google Drive API Access - Google Cloud Platform account - Google Drive API enabled - OAuth2 credentials configured - Read access to your target Google Drive folder 2. OpenAI API Account - Active OpenAI account with API access - Sufficient API credits for embeddings and chat completions - API key with appropriate permissions 3. n8n Instance - n8n cloud account or self-hosted instance - Webhook functionality enabled - Ability to install community nodes (LangChain nodes) 4. Target Chat Platform (Optional) - API credentials for your chosen chat platform - Webhook capability or API endpoints for message sending Required Permissions - Google Drive: Read access to folder contents and file downloads - OpenAI: API access for text-embedding-ada-002 and gpt-4o-mini models - External Platform: API access for sending/receiving messages (if integrating with existing chat systems) π Detailed Workflow Operation Phase 1: Knowledge Base Creation 1. File Monitoring: Two trigger nodes continuously monitor your Google Drive folder for new files or updates 2. Document Discovery: When changes are detected, the workflow searches for and identifies the modified files 3. Content Extraction: Downloads the actual file content from Google Drive 4. Text Processing: Uses LangChain's document loader to extract text from various file formats 5. Intelligent Chunking: Splits documents into overlapping chunks (configurable size) for optimal AI processing 6. Vector Generation: Creates embeddings using OpenAI's text-embedding-ada-002 model 7. Storage: Stores vectors in an in-memory vector store for instant retrieval Phase 2: Chat Interaction 1. Question Reception: Webhook receives user questions in JSON format 2. Data Extraction: Parses incoming data to extract chat content and session information 3. AI Processing: AI Agent analyzes the question and determines relevant context 4. Knowledge Retrieval: Searches the vector store for the most relevant document sections 5. Response Generation: OpenAI generates responses based on found content and conversation history 6. Authentication: Validates the request using token-based authentication 7. Response Delivery: Sends the answer back to the originating platform π Usage Instructions After Setup Adding Documents to Your Knowledge Base 1. Upload Files: Simply drag and drop documents into your configured Google Drive folder 2. Supported Formats: PDFs, TXT, DOC, DOCX, and other text-based formats 3. Automatic Processing: The workflow will au