← ClaudeAtlas

google-sheetslisted

Read and edit Google Sheets via the Sheets v4 REST API. Use when the user mentions Google Sheets, a spreadsheet, cells / ranges / tabs, reading or appending rows, updating values, or creating a new spreadsheet.
AceDataCloud/Skills · ★ 13 · AI & Automation · score 73
Install: claude install-skill AceDataCloud/Skills
Drive **Google Sheets** via `curl + jq`. The user's OAuth bearer token is in `$GOOGLE_SHEETS_TOKEN`; every call needs `Authorization: Bearer $GOOGLE_SHEETS_TOKEN`. Base URL: `https://sheets.googleapis.com/v4/spreadsheets`. The token carries `spreadsheets.readonly` (+ identity); writes need the broader `spreadsheets` scope. Failures are `{"error":{"code","message","status"}}` — show verbatim. `401` = re-install. `403 PERMISSION_DENIED` on a write = read-only scope → re-connect with read+write. The spreadsheet id is the `…/spreadsheets/d/<ID>/edit` segment of the URL. ```bash S="https://sheets.googleapis.com/v4/spreadsheets"; AUTH="Authorization: Bearer $GOOGLE_SHEETS_TOKEN" # Tabs + title curl -sS -H "$AUTH" "$S/SPREADSHEET_ID?fields=properties.title,sheets.properties(title,sheetId)" \ | jq '{title: .properties.title, tabs: [.sheets[].properties.title]}' ``` ## Read / append / update values ```bash ID="SPREADSHEET_ID" # Read a range (A1 notation; values are rows of cells) curl -sS -H "$AUTH" "$S/$ID/values/Sheet1!A1:D20" | jq '.values' # Append rows (confirm first). valueInputOption=USER_ENTERED parses formulas/dates. curl -sS -X POST -H "$AUTH" -H "Content-Type: application/json" \ -d '{"values":[["2026-06-21","Acme",4200]]}' \ "$S/$ID/values/Sheet1!A1:append?valueInputOption=USER_ENTERED" | jq '.updates' # Update a fixed range: PUT /values/{range}?valueInputOption=USER_ENTERED curl -sS -X PUT -H "$AUTH" -H "Content-Type: application/json" \ -d '{"values":[["do