Block 1 - When chat message received
- Type / Role
- @n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
- Config choices
- Version 1.1
This workflow is provided as-is. Please review and test before using in production.
A RAG Chatbot with n8n and Pinecone Vector Database Retrieval Augmented Generation (RAG) allows Large Language Models (LLMs) to provide context aware answers by retrieving information from an exter...
@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.vectorstorepinecone, @n8n/n8n-nodes-langchain.embeddingsopenai, @n8n/n8n-nodes-langchain.toolcalculator, n8n-nodes-base.googledrivetrigger
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Pramod Rathoure.
Original n8n.io sourceRetrieval-Augmented Generation (RAG) allows Large Language Models (LLMs) to provide context-aware answers by retrieving information from an external vector database. In this post, we’ll walk through a complete n8n workflow that builds a chatbot capable of answering company policy questions using Pinecone Vector Database and OpenAI models.
Our setup has two main parts:
This workflow section handles document ingestion. Whenever a new policy file is uploaded to Google Drive, it is automatically processed and indexed in Pinecone.
Nodes involved:
Google Drive Trigger
Watches a specific folder in Google Drive. Any new or updated file triggers the workflow.
Google Drive (Download)
Fetches the file (e.g., a PDF policy document) from Google Drive for processing.
Recursive Character Text Splitter
Splits long documents into smaller chunks (with a defined overlap). This ensures embeddings remain context-rich and retrieval works effectively.
Default Data Loader
Reads the binary document (PDF in this setup) and extracts the text.
OpenAI Embeddings
Generates high-dimensional vector representations of each text chunk using OpenAI’s embedding models.
Pinecone Vector Store (Insert Mode)
Stores the embeddings into a Pinecone index (n8ntest), under a chosen namespace. This step makes the policy data searchable by semantic similarity.
👉 Example flow: When HR uploads a new Work From Home Policy PDF to Google Drive, it is automatically split, embedded, and indexed in Pinecone.
Once documents are loaded into Pinecone, the chatbot is ready to handle user queries. This section of the workflow connects the chat interface, AI Agent, and retrieval pipeline.
Nodes involved:
When Chat Message Received
Acts as the webhook entry point when a user sends a question to the chatbot.
AI Agent
The core reasoning engine. It is configured with a system message instructing it to only use Pinecone-backed knowledge when answering.
Simple Memory
Keeps track of the conversation context, so the bot can handle multi-turn queries.
Vector Store QnA Tool
Queries Pinecone for the most relevant chunks related to the user’s question. In this workflow, it is configured to fetch company policy documents.
Pinecone Vector Store (Query Mode)
Acts as the connection to Pinecone, fetching embeddings that best match the query.
OpenAI Chat Model
Refines the retrieved chunks into a natural and concise answer. The model ensures answers remain grounded in the source material.
Calculator Tool
Optional helper if the query involves numerical reasoning (e.g., leave calculations or benefit amounts).
👉 Example flow: A user asks “How many work-from-home days are allowed per month?”. The AI Agent queries Pinecone through the Vector Store QnA tool, retrieves the relevant section of the HR policy, and returns a concise answer grounded in the actual document.
By combining n8n automation, Pinecone for vector storage, and OpenAI for embeddings + LLM reasoning, we’ve created a self-updating RAG chatbot.
This setup can easily be adapted for other domains — compliance manuals, tax regulations, legal contracts, or even product documentation.
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 | Create a company policy chatbot with RAG, Pinecone vector database, and OpenAI |
|---|---|
| Complexity | advanced |
| Nodes | 17 |
| Categories | AI RAG, Multimodal AI |
| Author | Pramod Rathoure |
| Published | 19 Aug 2025 |
Use the JSON export at /data/workflows/7563/7563.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.
A RAG Chatbot with n8n and Pinecone Vector Database Retrieval Augmented Generation (RAG) allows Large Language Models (LLMs) to provide context aware answers by retrieving information from an exter...
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 AI RAG, Multimodal AI use case.