An AI chat agent that edits your Google Sheet (in the sidebar)
"AI in a spreadsheet" usually means cell formulas. Useful — but limited. Cell formulas can't read another tab, can't write a chart, can't iterate. A chat agent can. gptsheet's chat agent lives in the sidebar, reads your sheet, runs tools, and writes results back inline. Here's what that looks like in practice.
What the agent can do
Tools the agent has access to:
get_selection— what range is the user looking at right nowread_range— fetch values from any rangewrite_range— write a 2D array back to any rangeget_sheet_info— list tabs, used range, headersinsert_formula— drop a formula into a cell (e.g.,=SUMIF(...))create_chart— line / bar / pie from a data rangecreate_image— wrap a generated image into a cell via=IMAGE()fetch_<saved>— call any user-defined API source (Max tier)conn_<connector>__<action>— every enabled connector action becomes a tool
Each tool maps to Sheets API server-side or UrlFetchApp for external calls. The agent runs in a loop: see the sheet → pick a tool → execute → read result → decide next step → finish with a written summary in chat.
Five real conversations
1. "Clean up this messy date column"
User selects column A (dates in 5 formats: 05/15/26, 2026-05-15, May 15, 2026, etc.).
- Agent:
read_range(A1:A50) - Agent: "I see 5 formats. I'll normalize to ISO 8601 in column B."
- Agent:
write_range(B1:B50, ...)with parsed dates - User: "Now sort by B descending."
- Agent: writes a sort formula or restructures the sheet
2. "Build a chart of MRR over time"
Sheet has subscription rows from the Stripe connector.
- Agent:
get_sheet_info→ finds the subscriptions tab - Agent: builds a pivot SUMIFS formula by month
- Agent:
create_chart(line, range)→ chart appears in the sheet
3. "Pull the last 100 PostHog events tagged 'signup' and bucket by day"
Requires PostHog connector + HogQL action enabled as a tool.
- Agent:
conn_posthog__run_hogql({ sql: "SELECT ... " }) - Agent:
write_rangethe result rows into a new tab - Agent:
create_chart(bar, ...)
4. "Translate column C to Spanish, keep the brand name 'Acme' unchanged"
- Agent:
read_range(C2:C200) - Agent: doesn't call
AI_TRANSLATEper cell — calls one LLM with the whole batch and instructions - Agent:
write_range(D2:D200, ...)
5. "What's our churn rate this month?"
- Agent:
get_sheet_info→ notices a Stripe subscriptions tab - Agent:
insert_formulain cell H1:=COUNTIF(subs!G:G, "canceled") / COUNTA(subs!A:A) - Agent: reports "3.2% — looks like 8 cancellations of 250 active subs this month."
Provider + model picker
The agent works with OpenAI, Anthropic, and Gemini. Each call uses one of the providers you've configured. The picker at the top of the agent UI shows every model from every provider you have a key for. Switching mid-conversation works — the chat context migrates between providers.
This matters because no single model is best at every step. We've benchmarked the trade-offs here.
How the agent is different from the cell formulas
| Cell formulas | Chat agent |
|---|---|
| One operation per cell | Multi-step plans |
| Single value or 1D/2D output | Can read + write + chart + call APIs in one turn |
| Recalculates on edits | Runs when you send a message |
| No tab awareness | Can read any tab, any range |
| No connector access | Every enabled connector action is a tool |
Use cell formulas for repeatable per-row transforms. Use the agent for ad-hoc analyses where the steps are different every time.
What it doesn't do
- It doesn't act outside the active workbook. No email sending, no scheduling external API jobs, no writing to other Sheets.
- It doesn't have memory across sessions. Each conversation starts fresh. (Tools and connectors persist; chat history doesn't.)
- It doesn't refresh in the background. Schedule a recurring job via the Imports system instead.
Privacy reminder
The agent's LLM calls go from your browser to your chosen provider directly. Sheet contents are sent in the prompts (the agent has to see the data to act on it), but only to the LLM provider you configured — never to gptsheet's servers.
Get the chat agent (Premium+)
Premium tier — $99 lifetime. Multi-provider, cross-model, connector-aware.
Get gptsheet Premium