Block 1 - Default Data Loader
- Type / Role
- @n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
- Config choices
- Version 1
This workflow is provided as-is. Please review and test before using in production.
Template Description This template creates a powerful Retrieval Augmented Generation (RAG) AI agent workflow in n8n. It monitors a specified Google Drive...
@n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.embeddingscohere, @n8n/n8n-nodes-langchain.chattrigger, n8n-nodes-base.googledrivetrigger, n8n-nodes-base.googledrive, @n8n/n8n-nodes-langchain.vectorstoremilvus, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Aitor | 1Node.
Original n8n.io sourceThis template creates a powerful Retrieval Augmented Generation (RAG) AI agent workflow in n8n. It monitors a specified Google Drive folder for new PDF files, extracts their content, generates vector embeddings using Cohere, and stores these embeddings in a Milvus vector database. Subsequently, it enables a RAG agent that can retrieve relevant information from the Milvus database based on user queries and generate responses using OpenAI, enhanced by the retrieved context.
The workflow automates the process of ingesting documents into a vector database for use with a RAG system.
Watch New Files: Triggers when a new file (specifically targeting PDFs) is added to a designated Google Drive folder.
Download New: Downloads the newly added file from Google Drive.
Extract from File: Extracts text content from the downloaded PDF file.
Default Data Loader / Set Chunks: Processes the extracted text, splitting it into manageable chunks for embedding.
Embeddings Cohere: Generates vector embeddings for each text chunk using the Cohere API.
Insert into Milvus: Inserts the generated vector embeddings and associated metadata into a Milvus vector database.
When chat message received: Adapt the trigger tool to fit your needs.
RAG Agent: Orchestrates the RAG process.
Retrieve from Milvus: Queries the Milvus database with the user's chat query to find the most relevant chunks.
Memory: Manages conversation history for the RAG agent to optimize cost and response speed.
OpenAI / Cohere embeddings: Uses ChatGPT 4o for text generation.
To use this template, you will need:
An n8n instance (cloud or self-hosted).
Access to a Google Drive account to monitor a folder.
A Milvus instance or access to a Milvus cloud service like Zilliz.
A Cohere API key for generating embeddings.
An OpenAI API key for the RAG agent's text generation.
Set up the required credentials in n8n for Google Drive, Milvus, Cohere, and OpenAI.
Configure the "Watch New Files" node to point to the Google Drive folder you want to monitor for PDFs.
Ensure your Milvus instance is running and the target cluster is set up correctly.
Activate the workflow.
Add PDF files to the monitored Google Drive folder. The workflow will automatically process them and insert their embeddings into Milvus.
Interact with the RAG agent. The agent will use the data in Milvus to provide context-aware answers.
Automates document ingestion for RAG applications.
Leverages Milvus for high-performance vector storage and search.
Uses Cohere for generating high-quality text embeddings.
Enables building a context-aware AI agent using your own documents.
Support for More File Types: Extend the "Watch New Files" node and subsequent extraction steps to handle various document types (e.g., .docx, .txt, .csv, web pages) in addition to PDFs.
Error Handling and Notifications: Implement robust error handling for each step of the workflow (e.g., failed downloads, extraction errors, Milvus insertion failures) and add notification mechanisms (e.g., email, Slack) to alert the user.
Contact us at https://1node.ai
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Build a document QA system with RAG using Milvus, Cohere, and OpenAI for Google Drive |
|---|---|
| Complexity | intermediate |
| Nodes | 14 |
| Categories | Internal Wiki, AI RAG |
| Author | Aitor | 1Node |
| Published | 03 May 2025 |
Use the JSON export at /data/workflows/3848/3848.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
Template Description This template creates a powerful Retrieval Augmented Generation (RAG) AI agent workflow in n8n. It monitors a specified Google Drive...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Internal Wiki, AI RAG use case.