Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

SheetMind – AI Assistant for Google Sheets

A Chrome Extension that lets you control Google Sheets using natural language, powered by Claude (Anthropic).


✨ Features

  • Natural language commands — "Create a 4×3 table with name, email, number, gender"
  • Charts & graphs — "Plot monthly signups by channel as a line chart"
  • Formatting — "Make the header row bold with a blue background and white text"
  • Formulas — "Add a SUM formula in the last row for all numeric columns"
  • Preview before apply — See exactly what Claude plans to do before it touches your sheet
  • CSV, TSV, TXT & PDF ingestion — Attach a file and generate charts directly from file data
  • Large CSV import mode — For bigger CSVs, data is written first and then visualization ops are generated
  • Multi-series charts — Chart operations can map one domain column to multiple series columns
  • Two UIs — Injected sidebar inside Sheets, or Chrome's native Side Panel

🚀 Setup

Step 1 — Configure your secure LLM proxy

The extension no longer stores an Anthropic API key in extension code. It calls your backend proxy endpoint.

In the Side Panel:

  1. Click Proxy in the file bar
  2. Enter your proxy URL (example: https://your-api.example.com/sheetmind/claude)
  3. Optionally enter a bearer token used by your backend

Expected proxy response JSON:

{ "text": "{\"summary\":\"...\",\"preview\":\"...\",\"operations\":[...] }" }

The text field must be a string containing the JSON operation plan.

Step 2 — Add your OAuth Client ID to the manifest

This extension uses chrome.identity to get a Google OAuth token so it can call the Sheets API on your behalf.

  1. Go to https://console.cloud.google.com
  2. Create a new project (or use an existing one)
  3. Enable the Google Sheets API
  4. Go to APIs & Services → Credentials
  5. Create an OAuth 2.0 Client ID → choose Chrome Extension
  6. Enter your extension ID (see Step 3 for how to get this)
  7. Copy the Client ID and add it to manifest.json:
"oauth2": {
  "client_id": "YOUR_CLIENT_ID.apps.googleusercontent.com",
  "scopes": [
    "https://www.googleapis.com/auth/spreadsheets"
  ]
}

Step 3 — Load the extension

  1. Open Chrome and go to chrome://extensions
  2. Enable Developer Mode (top-right toggle)
  3. Click Load unpacked
  4. Select the sheets-llm-extension folder
  5. Note the Extension ID shown — use this when setting up your OAuth Client ID in Step 2

Step 4 — Use it!

  1. Open any Google Sheet at https://docs.google.com/spreadsheets/
  2. Click the SheetMind icon in your Chrome toolbar
  3. Click Open Sidebar (injected into the page) or Open Side Panel (Chrome native panel)
  4. (Optional) Attach a CSV, TSV, TXT, or PDF from the file bar
  5. Type a command and hit Send
  6. Review the Preview of changes
  7. Click ✓ Apply Changes to execute

For large CSV files, SheetMind imports rows in chunks first and then asks the model for visualization-only steps.


🗣️ Example Prompts

Prompt What it does
Create a 4×3 table with name, email, number, gender Writes headers + sample data, formats header row
Create a pivot table summarizing signups by channel and month Builds a pivot table from your existing data
Use the attached CSV to build a monthly trend dashboard Imports CSV data and creates trend/category charts
Read the attached PDF table and plot revenue by region Extracts table data from PDF and creates chart ops
Format the header row — bold, blue background, white text Applies formatting to row 1
Add SUM formulas in the last row for all numeric columns Writes =SUM() formulas
Freeze the first row Freezes row 1 as header
Auto-resize all columns Makes columns fit their content
Clear everything from A1 to Z100 Clears that range

📁 File Structure

sheets-llm-extension/
├── manifest.json        # Extension manifest (MV3)
├── background.js        # Service worker — proxy LLM calls & token handling
├── content.js           # Injected sidebar UI & Sheets API execution
├── sidebar.css          # Sidebar styles
├── popup.html           # Extension icon popup
├── popup.js             # Popup logic
├── sidepanel.html       # Chrome native side panel UI
├── sidepanel.js         # Side panel logic & Sheets API execution
└── icons/
    ├── icon16.png
    ├── icon48.png
    └── icon128.png

⚠️ Notes

  • Changes are applied via the Google Sheets API — the tab will reload after applying to show updates.
  • The extension only activates on docs.google.com/spreadsheets URLs.
  • Claude generates a preview of every planned operation before anything is written — you always confirm first.
  • Charts are placed to the right of your data by default (column F, row 2 anchor).
  • If a file is attached, file data is prioritized over synthetic sample data.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages