Build a powerful RAG system using this n8n workflow. Automatically index Google Drive files into a vector store and answer questions via Telegram using the GPT-4-mini n8n node.
Download this n8n workflow template and start using it instantly.
Technical users looking for advanced n8n templates for knowledge management.
Businesses needing automated Q&A based on internal documentation stored in Google Drive.
Developers building custom Retrieval-Augmented Generation (RAG) systems using the n8n platform.
Anyone seeking to deploy a cost-effective, real-time AI agent using a structured n8n node layout.
This comprehensive n8n workflow addresses the challenge of making unstructured corporate data searchable and conversational. By combining a Google Drive n8n trigger for indexing and a Telegram n8n trigger for user interaction, it provides a seamless knowledge agent experience. When a new file is uploaded to Google Drive, the n8n workflow automatically processes it, generates embeddings, and inserts the data into an in-memory vector store. Crucially, the system utilizes an OpenAI agent configured with a powerful system prompt (GPT-4-mini specified in the n8n node setup) to retrieve and analyze the relevant data chunks, ensuring that answers provided via Telegram are accurate and grounded in the source documents. This complete n8n solution is an excellent demonstration of production-ready RAG architecture built entirely within n8n.
This n8n workflow operates via two distinct, interconnected paths:
Path A: Document Indexing (The Google Drive n8n workflow trigger)
File uploaded n8n trigger constantly monitors a specified Google Drive folder for new files.Download file n8n node retrieves the binary data.Default Data Loader and then processed by the Embedding model n8n node (using OpenAI credentials) to convert text into vector representations.Insert documents n8n node stores these embeddings in an in-memory vector store keyed as vectorstorekey, preparing the knowledge base for retrieval.Path B: AI Chatbot Interaction (The Telegram n8n workflow trigger)
Listen for incoming events Telegram n8n trigger starts the process when a user sends a message.AI Agent n8n node. This agent orchestrates the entire Q&A process using the gpt-4.1-mini Model.Retrieve documents n8n node as a tool. This tool searches the centralized vectorstorekey using similarity search (top K=10) powered by the same OpenAI Embedding model used during indexing.Telegram n8n node sends the agent's output back to the user in Markdown format. This robust n8n workflow ensures your AI agent always uses the latest indexed data.To deploy this powerful n8n workflow template, follow these steps:
File uploaded n8n trigger, specify the Folder ID of the Google Drive location you wish to monitor for documents.Embedding model n8n node and the Model n8n node. Ensure your API key supports the specified model, which is gpt-4.1-mini in this n8n template.Listen for incoming events n8n trigger and the final Telegram n8n node.Insert documents n8n node.This n8n workflow utilizes several specialized Langchain and standard n8n nodes:
File uploaded (Google Drive Trigger): Acts as the indexing n8n trigger. It listens for fileCreated events within a specific Google Drive folder ID (Rag-Folder).
Download file (Google Drive n8n node): Downloads the binary data of the newly uploaded file based on the trigger output.
Embedding model (Langchain Embeddings OpenAI n8n node): Generates vector embeddings using OpenAI. This node is shared between the indexing and retrieval paths, a critical configuration for RAG consistency.
Insert documents (Langchain Vector Store In Memory n8n node): Stores the documents and their embeddings into the in-memory vector store identified by vectorstorekey.
Listen for incoming events (Telegram Trigger): The communication n8n trigger, listening for user messages to initiate the conversational AI.
Retrieve documents (Langchain Vector Store In Memory n8n node): Configured in retrieve-as-tool mode (Top K=10). This tool is used by the AI agent to search the vector store based on the user's question.
Model (Langchain Chat OpenAI n8n node): Specifies the Language Model (gpt-4.1-mini) used by the agent for synthesizing grounded answers.
Simple Memory (Langchain Memory Buffer Window n8n node): Provides conversational context by storing recent chat history, using the Telegram chat ID as the session key.
Deploy a custom AI Document Q&A chatbot on Telegram using this powerful n8n workflow. Integrates Google Gemini, Supabase vector storage, and advanced RAG capabilities. Explore n8n templates for AI.

Use this powerful n8n workflow to automate complex document parsing, utilizing Mistral OCR for extraction, structured data generation via specialized AI agents, and automated delivery through Telegram. A comprehensive n8n template for data processing.

Create a powerful Retrieval-Augmented Generation (RAG) system using a comprehensive n8n workflow. Analyze uploaded files with Llama Parser, index data in Pinecone, and deploy a Gemini-powered chatbot for Q&A.

Use this advanced n8n workflow to build a powerful Retrieval-Augmented Generation (RAG) system. Integrate Google Drive, OpenAI embeddings, and Pinecone DB for instant document Q&A via chat or a custom UI webhook.

Build a powerful RAG system using this n8n workflow. Ingest research papers, generate Voyage-Context-3 contextual embeddings, store vectors in MongoDB Atlas, and run an interactive Q&A agent powered by OpenAI. This n8n templates example showcases advanced AI flows.









































