# Google Sheets Analysis

Reads, analyzes, and edits Google Sheets via the Sheets API.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).



<DocsBaseSwitcher base="eve" agent="google-sheets" />

<AgentPreview
  agent="google-sheets"
  framework="eve"
  inputFields="[
  {
    name: &#x22;spreadsheetId&#x22;,
    label: &#x22;Spreadsheet ID&#x22;,
    placeholder: &#x22;1A2b3C4d5E6f7G8h9I0j…&#x22;,
    type: &#x22;text&#x22;,
  },
  {
    name: &#x22;request&#x22;,
    label: &#x22;Request&#x22;,
    placeholder: &#x22;Total revenue by region and write it to F1.&#x22;,
    type: &#x22;text&#x22;,
  },
]"
/>

## Summary [#summary]

The **Google Sheets Analysis Agent** reads a spreadsheet, answers questions about
it, and — on request — writes results back. It loads ranges in A1 notation,
computes totals/trends/joins, and updates cells only when you ask. Reach for it to
turn a sheet into a conversational analyst or to automate routine spreadsheet
edits.

## Install [#install]

```bash
npx shadcn@latest add https://agentcn.vercel.app/r/eve/google-sheets.json
```

## Composition [#composition]

```text
agent/
├── agent.ts             # Agent definition (model + config)
├── instructions.md      # Read-before-write analysis instructions
└── tools/
    ├── read_range.ts    # Reads a range (A1 notation)
    └── update_range.ts  # Writes values to a range
```

## Customization [#customization]

* **Use a service account.** Mint the access token from a service account for
  unattended runs.
* **Add operations.** Add tools for appending rows, formatting, or creating sheets.
* **Guard writes.** Require explicit confirmation before any `update_range` call.
* **Swap the model.** Edit `agent/agent.ts`.
