Edit Google Sheets by chat using GPT-4o-mini with approval and audit log

Go to Workflow
0 views
Built by Ziad Karim Ziad Karim
Created on August 11, 2026

Description

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 nodes, five-minute setup.

How it works
When You Ask a Question is n8n's hosted chat — open the chat URL and type a question in plain language.
Answer With Data, Not Guesses is an AI agent with one tool: Read the Spreadsheet. It pulls the live rows from your Google Sheet and computes the answer from real data — it never guesses from memory.
Remember the Conversation keeps context, so follow-ups like "and the month before that?" just work.
Answers come back in the chat with the actual numbers.

Setup
Connect an OpenAI (or compatible) credential in OpenAI Analyst Model — any OpenAI-compatible endpoint works.
Connect your Google Sheets account in Read Data from Sheets and pick the spreadsheet and sheet the agent should read.
Optional but worth it: add one line describing your columns to the system message in Data-Driven Response Agent (e.g. "Columns: Date, Country, Revenue in USD") — answers get noticeably better.
Activate the workflow and open the chat via When User Asks Question → Chat, then ask something like "what was our best month?" to test.

Requirements
OpenAI (or compatible) API key, Google Sheets.

Customization
Describe your columns in the agent's system prompt for noticeably better answers ("Revenue is in USD, Date is YYYY-MM-DD"). Add more sheet tools for multi-tab analysis. Add an append/update Sheets tool to let the agent write rows, not just read them. For big datasets, swap the Sheets tool for a Postgres/MySQL tool - the agent pattern is identical.

Additional info
The chat is n8n's hosted chat page. Set it to public to share the analyst with teammates who don't have n8n access.

Nodes Used (6)

AI Agent
@n8n/n8n-nodes-langchain.agent
Code
n8n-nodes-base.code
Google Sheets
n8n-nodes-base.googleSheets
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow
Telegram
n8n-nodes-base.telegram