Build a document-upload RAG chatbot with OpenAI, Pinecone and daily analytics
Ready for 3.0What this workflow does
This AI workflow has 18 nodes and runs when someone submits an n8n form (“Document Upload for RAG”) (plus 2 other triggers). Along the way it connects Embeddings OpenAI, Pinecone Vector Store, OpenAI Chat Model and Gmail.
How it runs
Trigger: When someone submits an n8n form (“Document Upload for RAG”) (plus 2 other triggers).
- Workflow Configuration (Edit Fields (Set)): sets 5 fields: pineconeIndex, pineconeNamespace, chunkSize…
- RAG Chatbot Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 1 tool (Pinecone Vector Store); memory: Chat Memory
- Get Chat Logs (Data table): get
- Store Form Responses (Data table): uses Data table
- Pinecone Insert Documents (Pinecone Vector Store): stores documents in the Pinecone vector store, with embeddings: OpenAI Embeddings; document loader: Document Loader
- Prepare Chat Log (Edit Fields (Set)): sets 5 fields: userQuery, botResponse, timestamp…
- Analyze Chat Data (Code): runs custom JavaScript code
- Log Chat Interactions (Data table): uses Data table
- Send Daily Summary Email (Gmail): uses Gmail
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (14)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Edit Fields (Set)
n8n-nodes-base.set - Data table
n8n-nodes-base.dataTable - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Pinecone Vector Store
@n8n/n8n-nodes-langchain.vectorStorePinecone - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Code
n8n-nodes-base.code - Gmail
n8n-nodes-base.gmail
From the author
Overview This workflow implements a complete Retrieval-Augmented Generation (RAG) knowledge assistant with built-in document ingestion, conversational AI, and automated analytics using n8n, OpenAI, and Pinecone. The system allows users to upload documents,…