Smart Chat Assistant with GPT-5, Google Sheets, and Pinecone RAG Memory

Go to Workflow
0 views
Built by Rahul Joshi Rahul Joshi
Created on November 14, 2025

Description

šŸ“Š 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 relevant contextual data, generates natural and context-aware responses via OpenAI GPT-5, and automatically logs every interaction in Google Sheets. It also auto-indexes new documents from Google Drive into Pinecone for knowledge expansion and emails weekly chat history summaries for review. šŸ’¬šŸ“Š

What This Template Does
1ļøāƒ£ Chat Trigger – Receives incoming chat messages through a webhook. šŸ’¬
2ļøāƒ£ Data Enrichment – Extracts topic, intent, and context from messages. 🧩
3ļøāƒ£ Context Retrieval – Fetches structured data from Google Sheets and semantic data from Pinecone. 🧠
4ļøāƒ£ AI Response Generation – Uses GPT-5 to produce relevant, human-like replies with contextual references. šŸ¤–
5ļøāƒ£ Conversation Logging – Stores chat sessions with timestamps and detected intent in Google Sheets. šŸ“‹
6ļøāƒ£ Knowledge Base Expansion – Automatically indexes new files from Google Drive to Pinecone for future RAG responses. šŸ“‚
7ļøāƒ£ Weekly Report – Aggregates all chats and sends an email summary with logs attached via Gmail every Monday. šŸ“§

Key Benefits
āœ… AI chat assistant with contextual accuracy using RAG
āœ… Auto-updating knowledge base via Google Drive → Pinecone
āœ… End-to-end chat tracking and audit-ready logging
āœ… Weekly performance reports via Gmail
āœ… Seamless integration with Google Workspace

Features
Retrieval-Augmented Generation (RAG) workflow
Google Sheets integration for structured memory
Pinecone vector database for semantic retrieval
GPT-5 for context-aware conversation generation
Google Drive watcher for automatic knowledge updates
Gmail integration for weekly report delivery
Built-in JSON validation and session memory

Requirements
OpenAI API key (GPT-4/GPT-5)
Google Sheets OAuth2 credentials
Pinecone API credentials
Google Drive OAuth2 credentials
Gmail OAuth2 credentials

Replace:
PINECONE_INDEX with your index name
GOOGLE_SHEET_ID with your log sheet ID
GOOGLE_DRIVE_FOLDER_ID with monitored folder

Target Audience
Support and helpdesk automation teams šŸ’¬
AI chatbot developers enhancing context recall šŸ¤–
Businesses maintaining searchable conversation history šŸ¢
Knowledge managers syncing chat + document intelligence 🧠

Step-by-Step Setup Instructions
1ļøāƒ£ Connect your OpenAI, Pinecone, Google Sheets, Google Drive, and Gmail credentials.
2ļøāƒ£ Update the Pinecone index and Google Sheet ID in the nodes.
3ļøāƒ£ Set your chat webhook URL for real-time message input.
4ļøāƒ£ Add your Google Drive folder ID for automated knowledge ingestion.
5ļøāƒ£ Test the chat workflow with sample messages.
6ļøāƒ£ Enable the schedule trigger to email weekly chat logs automatically. āœ…

This workflow was created by Rahul Joshi and shared publicly on the n8n community template library. n8nFind indexes it for discovery — the workflow remains the property of its original creator.

Nodes Used (11)

AI Agent
@n8n/n8n-nodes-langchain.agent
Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader
Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi
Gmail
n8n-nodes-base.gmail
Google Drive
n8n-nodes-base.googleDrive
Google Sheets
n8n-nodes-base.googleSheets
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Pinecone Vector Store
@n8n/n8n-nodes-langchain.vectorStorePinecone
Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter
Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow
Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured