Use this powerful n8n workflow to create an AI assistant that monitors Google Drive for company documents, automatically processes them into a knowledge base using OpenAI embeddings, and answers user queries via a webhook. Leverage advanced n8n templates for RAG implementation.
Download this n8n workflow template and start using it instantly.
Companies needing automated internal document support.
Developers building conversational AI interfaces.
Users looking for advanced LangChain and n8n templates.
Anyone wanting to turn unstructured data into a searchable knowledge base using an n8n workflow.
This sophisticated n8n workflow solves the problem of decentralized knowledge management by creating a real-time, searchable knowledge base directly from Google Drive files. It operates in two parallel streams: document ingestion and AI querying. The ingestion stream ensures that any new document added to a monitored Drive folder is immediately processed, chunked, embedded via OpenAI, and stored. The querying stream uses a webhook as an n8n trigger to receive user questions, which are then routed to an AI Agent. This Agent uses a specialized RAG tool to search the knowledge base before formulating a precise, context-aware response using the power of GPT-4. This approach ensures high accuracy and provides traceable citations, significantly enhancing the utility of the n8n automation solution.
This n8n workflow consists of two primary, independent execution paths:
sessionid.sessionid to maintain context for ongoing conversations.gpt-4.1-mini model as the LLM for the Agent.To deploy and utilize this powerful n8n workflow using these n8n templates, follow these setup steps:
Watch Company Docs Folder n8n trigger.Fetch New Document n8n node requires a Google Service Account credential for secure document downloads.Generate Document Embeddings n8n node and the OpenAI Chat Model n8n node.YOURN8NURL/webhook/chat-input) with a JSON body like: {"data": "What is the policy on vacation time?", "sessionid": "testuser_1"}.This n8n workflow relies heavily on the LangChain suite of nodes for sophisticated RAG functionality.
Watch Company Docs Folder (n8n trigger): Triggers the workflow when a file is created in a specified Google Drive folder.
Fetch New Document (Google Drive n8n node): Downloads the detected file's binary content, essential for ingestion.
Store in Knowledge Base (LangChain Vector Store In Memory n8n node): Serves as the vector database. It uses the insert mode to save embeddings under the key company docs.
Generate Document Embeddings (LangChain Embeddings OpenAI n8n node): Converts text into searchable vectors using OpenAI's embedding model.
Conversation History (LangChain Memory Buffer Window n8n node): Manages conversational context, using the incoming session_id to track individual user chats.
Search Company Documents (LangChain Vector Store In Memory n8n node): Configured for RAG. It operates in retrieve-as-tool mode, pulling the top 5 chunks relevant to the user's query from the company docs key.
OpenAI Chat Model (LangChain LLM n8n node): Defines the large language model used for generation, specifically configured to use gpt-4.1-mini.
Company Knowledge Assistant (LangChain Agent n8n node): The core intelligence. It is prompted with strict instructions to use the Search Company Documents tool for accurate, cited answers, providing a powerful layer of AI automation to the n8n setup.
Use this powerful n8n workflow to automate highly personalized cold email campaigns. Integrate Google Sheets for lead management, Google Gemini for content generation, and Gmail for seamless delivery and tracking.

Automate your cold calling campaigns using this powerful n8n workflow. Integrate Google Sheets with Vapi.ai and GPT-4o for status tracking and automated outreach. Leverage robust n8n templates.

Automate advanced code reviews using an n8n workflow, combining custom linting with Gemini AI feedback. Stores red-marked corrections in Google Sheets and alerts Slack.

Use this powerful n8n workflow to enrich contact data using dynamic AI providers (OpenAI, Anthropic), generate detailed insights, and log results securely in Supabase. Explore versatile n8n templates for advanced sales automation.

Automate Airtable contact management using AI agents and natural language with this powerful n8n workflow. This n8n template enables dynamic database operations triggered by conversational prompts.

I love building smart n8n automations that actually work reliably. My focus is on making everyday tasks like email, social media, and CRM workflows simpler using AI. I've shared templates in the n8n community, including a WhatsApp Expense Tracker that people really enjoy. What keeps me excited is constantly trying new things - testing fresh nodes, playing with AI tools like LangChain, and discovering creative ways to connect systems!







































