Local RAG AI Agent for Google Drive Knowledge Base
detail.loadingPreview
Deploy a powerful, private AI agent that leverages your local machine and automatically indexes documents from Google Drive. This workflow enables Retrieval Augmented Generation (RAG) capabilities, allowing your agent to answer questions based on your specific documents while maintaining conversational memory.
About This Workflow
This comprehensive n8n workflow creates a robust, local AI agent solution centered around Retrieval Augmented Generation (RAG). By integrating with Ollama, you gain full control over your LLM (using llama3.1:latest) and embeddings (nomic-embed-text:latest), ensuring data privacy and local processing. The agent automatically monitors a specified Google Drive folder for new or updated documents (like "Meeting Notes"), downloads them, extracts text, and prepares them for a vector store. This dynamic indexing keeps your knowledge base always up-to-date. Combined with persistent chat memory via PostgreSQL, your AI agent delivers context-aware and accurate responses derived directly from your own information, all without sending data to external cloud providers.
Key Features
- Private & Local AI: Utilize Ollama for
llama3.1:latestLLM andnomic-embed-text:latestembeddings, ensuring all AI processing happens on your local infrastructure. - Automated Document Indexing: Seamlessly monitor and ingest new or updated files from a designated Google Drive folder (e.g., "Meeting Notes") into your RAG system.
- Retrieval Augmented Generation (RAG): Empower your AI agent to fetch relevant information from your indexed documents, providing highly accurate and context-specific answers.
- Persistent Chat Memory: Leverage PostgreSQL to store and recall past conversations, enabling a continuous and natural chat experience with your local AI.
- Configurable Text Processing: Customize document splitting and metadata assignment to optimize retrieval performance for your specific data.
How To Use
- Install Ollama: Ensure Ollama is running and has the
llama3.1:latestandnomic-embed-text:latestmodels downloaded on your machine. - Set up PostgreSQL: Configure a PostgreSQL database instance to store the AI agent's chat memory.
- Connect Google Drive: Authenticate your Google Drive account in n8n and specify the "Meeting Notes" folder you wish to monitor for document indexing.
- Vector Store Configuration: While the vector store ingestion node is not explicitly shown, you will need to connect the "Embeddings Ollama1" output to your chosen vector store (e.g., Pinecone, Chroma, Weaviate, or a local file-based store) to store the document chunks and their embeddings for the "Vector Store Tool" to query.
- Adjust Text Splitter: Modify the
chunkSizeparameter in the "Recursive Character Text Splitter" node as needed to optimize document segmentation for your data. - Deploy and Interact: Activate the workflow and interact with your local RAG AI agent, leveraging its newfound knowledge from your Google Drive documents.
Apps Used
Workflow JSON
{
"id": "4ef37a7f-7490-4c98-89da-7946da1af7f2",
"name": "Local RAG AI Agent for Google Drive Knowledge Base",
"nodes": 6,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 4ef37a7f-7490...
About the Author
SaaS_Connector
Integration Guru
Connecting CRM, Notion, and Slack to automate your life.
Statistics
Related Workflows
Discover more workflows you might like
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.
Automate Getty Images Editorial Search & CMS Integration
This n8n workflow automates searching for editorial images on Getty Images, extracts key details and embed codes, and prepares them for seamless integration into your Content Management System (CMS), streamlining your content creation process.