This n8n workflow implements a RAG (Retrieval-Augmented Generation) chatbot 🤖 that can answer questions based on your company documents or any dataset you provide. The bot uses Google Gemini embeddings, Pinecone vector store, and an AI Agent for contextual answers.
- 📂 Upload and monitor company documents from Google Drive
- 🔄 Automatically process new or updated files
- 🧠 Convert documents into embeddings using Google Gemini API
- 💾 Store embeddings in Pinecone vector database
- 🗨️ Use AI Agent to answer questions based on retrieved documents
- 📝 Maintains conversation memory with sliding window buffer
- ⚡ Easy to extend to new datasets
- n8n (latest version)
- Google Cloud Project with Vertex AI API enabled
- Google AI API Key (for Google Gemini)
- Pinecone account with index (e.g.,
company-files) - Google Drive credentials in n8n (OAuth2)
-
Google Cloud Project & Vertex AI API
- Create a project in Google Cloud ☁️
- Enable Vertex AI API ✅
-
Google AI API Key
- Obtain your API key from Google AI Studio 🔑
-
Pinecone Setup
- Create a free account at Pinecone 🖥️
- Create an index called
company-files📌
-
Google Drive
- Create a dedicated folder for company documents 📁
- Note the folder ID 🆔
-
Configure Credentials in n8n
- Google Drive OAuth2 🔐
- Google Gemini API (PaLM) 🤖
- Pinecone API Key 🗄️
-
Import Workflow
- Import the provided JSON workflow into n8n 📥
-
Configure Nodes
- Update Google Drive Trigger nodes to watch your specific folder 👀
- Configure Pinecone Vector Store nodes with your index 💾
- Once the workflow is running, any new or updated document in the folder will be automatically processed.
- Ask questions through the chatbot 🗨️ and it will retrieve the most relevant information from your documents.
- If a question cannot be answered, the bot will respond:
"I cannot find the answer in the available resources." ❌
- Ensure your Google AI API Key, Pinecone API Key, and Google Drive credentials are properly configured in n8n.
- Adjust the window buffer memory for longer or shorter conversation contexts.
- The workflow is fully modular, so you can add more tools, vector stores, or embeddings as needed.