Smart chat assistant with GPT-5, Google Sheets, and Pinecone RAG memory
Ready for 3.0What this workflow does
This AI workflow has 22 nodes and runs when a chat message arrives (plus 2 other triggers). Along the way it connects OpenAI Chat Model, Google Drive, Embeddings OpenAI and Google Sheets and 2 more.
How it runs
Trigger: When a chat message arrives (plus 2 other triggers).
- Format Data For AI Agent (Edit Fields (Set)): sets 4 fields: intent, topic, content_id…
- Get Data from Sheet. (Google Sheets): uses Google Sheets
- Download file (Google Drive): download
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 2 tools (Get Previous Content from Sheet, Pinecone Vector Store); memory: Short-Term Memory; output parser: Output Parser (JSON Enforcement)
- Aggregate: combines items into one
- Pinecone Vector Store: stores documents in the Pinecone vector store, with embeddings: Embeddings OpenAI; document loader: Default Data Loader
- Conversation Logging (Google Sheets): append or update
- Convert Data to file (Convert to File): converts data to a file (to text)
- Check File Exist (If): checks a condition and branches into true / false
- Send Chat History with attachment (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 (19)
- Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - AI Agent
@n8n/n8n-nodes-langchain.agent - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Drive
n8n-nodes-base.googleDrive - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Aggregate
n8n-nodes-base.aggregate - Google Sheets Tool
n8n-nodes-base.googleSheetsTool - Google Sheets
n8n-nodes-base.googleSheets - Pinecone Vector Store
@n8n/n8n-nodes-langchain.vectorStorePinecone - Convert to File
n8n-nodes-base.convertToFile - If
n8n-nodes-base.if - Gmail
n8n-nodes-base.gmail - Edit Fields (Set)
n8n-nodes-base.set
From the author
📊 Description Empower your workflows with an intelligent AI chat assistant that retrieves real-time context from Google Sheets and a Pinecone knowledge base using Retrieval-Augmented Generation (RAG). 🤖📂 This workflow processes chat messages, retrieves…