Edit Google Sheets by chat using GPT-4o-mini with approval and audit log
Needs changesWhat this workflow does
This AI workflow has 18 nodes and runs when a chat message arrives. Along the way it connects OpenAI Chat Model, Google Sheets and Telegram.
How it runs
Trigger: When a chat message arrives.
- Spreadsheet Assistant (AI Agent): runs an AI agent, with model: Assistant Model; 1 tool (Read the Sheet for Answers); memory: Conversation Memory
- Check the Proposed Change Is Safe (Code): runs custom JavaScript code
- Is It a Change Request? (If): checks a condition and branches into true / false
- Read the Row as It Is Now (Google Sheets): read
- Build the Before-and-After Preview (Code): runs custom JavaScript code
- Is There Anything Left to Change? (If): checks a condition and branches into true / false
- Ask You to Confirm the Change (Telegram): send and wait for a reply
- Did You Approve It? (If): checks a condition and branches into true / false
- Prepare the Row Update (Code): runs custom JavaScript code
- Apply the Approved Change (Google Sheets): update
…plus 1 more step. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in Spreadsheet Assistant (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Spreadsheet Assistant (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (10)
- Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Google Sheets Tool
n8n-nodes-base.googleSheetsTool - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp - Google Sheets
n8n-nodes-base.googleSheets - Telegram
n8n-nodes-base.telegram
From the author
Quick overview Ask your spreadsheet questions in plain language — "best month?", "revenue by country?", "rows missing an email?" — and an AI agent reads the live sheet and answers with real numbers. Conversation memory makes follow-up questions work. Five…