An AI chat agent that edits your Google Sheet (in the sidebar)

FeatureMay 15, 2026 · 8 min read

"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:

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.).

  1. Agent: read_range(A1:A50)
  2. Agent: "I see 5 formats. I'll normalize to ISO 8601 in column B."
  3. Agent: write_range(B1:B50, ...) with parsed dates
  4. User: "Now sort by B descending."
  5. 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.

  1. Agent: get_sheet_info → finds the subscriptions tab
  2. Agent: builds a pivot SUMIFS formula by month
  3. 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.

  1. Agent: conn_posthog__run_hogql({ sql: "SELECT ... " })
  2. Agent: write_range the result rows into a new tab
  3. Agent: create_chart(bar, ...)

4. "Translate column C to Spanish, keep the brand name 'Acme' unchanged"

  1. Agent: read_range(C2:C200)
  2. Agent: doesn't call AI_TRANSLATE per cell — calls one LLM with the whole batch and instructions
  3. Agent: write_range(D2:D200, ...)

5. "What's our churn rate this month?"

  1. Agent: get_sheet_info → notices a Stripe subscriptions tab
  2. Agent: insert_formula in cell H1: =COUNTIF(subs!G:G, "canceled") / COUNTA(subs!A:A)
  3. 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 formulasChat agent
One operation per cellMulti-step plans
Single value or 1D/2D outputCan read + write + chart + call APIs in one turn
Recalculates on editsRuns when you send a message
No tab awarenessCan read any tab, any range
No connector accessEvery 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

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