Deploy a powerful RAG system using this comprehensive n8n workflow. Automate PDF ingestion from Google Drive and enable interactive querying via a Telegram chatbot.
Download this n8n workflow template and start using it instantly.
Data Engineers needing to automate document ingestion into a knowledge base.
Businesses requiring an interactive Q&A system over technical documentation.
Developers looking for advanced n8n templates integrating LangChain with vector databases.
Automation Specialists seeking to deploy conversational AI agents via Telegram using an n8n trigger.
This advanced n8n workflow solves the complex challenge of continuously updating a knowledge base from external sources (like Google Drive PDFs) and making that data instantly queryable through a user-friendly conversational interface (Telegram). This robust solution showcases the power of an n8n workflow to integrate diverse services—cloud storage, vector databases (PGVector), and large language models (Azure OpenAI)—into a seamless AI agent experience. Users benefit from automated content ingestion and real-time Q&A, built entirely using specialized n8n templates and nodes. The workflow includes two primary functions: automated mass ingestion via Google Drive and interactive, user-initiated file ingestion and chatting via Telegram. Every part of this n8n workflow uses specific n8n node capabilities to handle file parsing, chunking, embedding, retrieval, and conversation memory.
This n8n workflow operates across two parallel, distinct flows:
Run Ingestion manual n8n trigger starts the process (or can be adapted to an n8n trigger like a schedule or webhook).List All File Names Google Drive n8n node fetches a list of PDF files targeted for ingestion.Loop Over Items n8n node to process each file individually. The Download Corresponding File node retrieves the binary data.HTTP Request n8n node (Send PDF File).PDF Ingest Webhook or the linked flow path.Default Data Loader n8n node loads the document content.Token Splitter n8n node.Embeddings Mistral Cloud n8n node converts the text chunks into vectors.Postgres PGVector Store n8n node stores these vectors, completing the ingestion into the RAG knowledge base.Telegram Trigger n8n trigger, listening for incoming messages.If Text Message Received n8n node determines if the input is a text query or a file upload.AI Agent2).Azure OpenAI Chat Model3 for generation, maintaining context via the Simple Memory n8n node.Embeddings Mistral Cloud3 to find relevant context.Send a Text Message Telegram n8n node.Approve Ingestion). If approved, the file is downloaded, forwarded for ingestion (similar to the Google Drive path), and the user is notified with a Send Finished Message.To deploy this powerful n8n workflow, follow these steps:
Telegram Trigger (input) and the Telegram nodes (output).Azure OpenAI Chat Model nodes (LLM connection).Telegram Trigger, PDF Ingest Webhook, and the Chat Trigger nodes. Configure your Telegram bot to point incoming traffic to the primary Telegram n8n trigger URL.PGVector Store, Embeddings, Agent) are configured with the correct model names, collection names, and prompt templates relevant to your RAG use case. Telegram Trigger: Acts as the primary conversational n8n trigger, initiating the RAG flow when a user sends a message or file.
AI Agent2 (LangChain): The core intelligence of the chat component. This n8n node orchestrates the LLM and the RAG tool to formulate responses based on retrieved context.
Azure OpenAI Chat Model3: The LLM used by the AI Agent for response generation and reasoning.
Postgres PGVector Store3: Configured as the retrieval tool for the AI Agent. This n8n node queries the vector knowledge base to find context relevant to the user's question.
Run Ingestion (Manual Trigger): Used as an initialization n8n trigger to manually start the bulk PDF processing pipeline from Google Drive.
List All File Names (Google Drive): This n8n node specifically targets and lists PDF files from a specified Google Drive folder for ingestion.
Default Data Loader (LangChain): Essential n8n node in the ingestion pipeline, responsible for loading the raw PDF file content for further processing.
Token Splitter (LangChain): This n8n node ensures optimal chunking of the document text before embedding, vital for effective RAG performance.
Embeddings Mistral Cloud: Generates high-quality vector representations (embeddings) of the document chunks, a critical step handled by this specific n8n node.
If Text Message Received / If PDF File Received / If User Approved (If Node): Logic control n8n nodes that branch the workflow path based on user input, defining whether the user wants to chat or ingest a file.
Create a powerful RAG knowledge base using this advanced n8n workflow. Automate PDF ingestion from S3, leverage OpenAI embeddings, and deploy a GPT-4o agent powered by Qdrant.

Use this powerful n8n workflow to automate invoice processing. Extract structured data from PDF files in Google Drive, log details to Google Sheets, and send instant alerts via Telegram using Claude AI.

Deploy a powerful n8n workflow server using the MCP Trigger for doqs.dev. Enable AI agents to create, fill, and generate PDF documents using this specialized n8n template with 14 exposed API tools.

Automate PDF report analysis using a sophisticated n8n workflow. Monitor FTP folders, extract key insights with GPT-3.5, and send structured alerts via Slack and Email.

Use this robust n8n workflow to automate complex PDF parsing and convert documents into clean markdown using the LlamaCloud API, featuring automatic job polling and retry logic.


Delusional of 5 years!🎉🎉







































