Loading...
Loading...
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.
npx skill4agent add acedatacloud/skills google-sheetscurl + jq$GOOGLE_SHEETS_TOKENAuthorization: Bearer $GOOGLE_SHEETS_TOKENhttps://sheets.googleapis.com/v4/spreadsheetsspreadsheets.readonlyspreadsheets{"error":{"code","message","status"}}401403 PERMISSION_DENIED…/spreadsheets/d/<ID>/editS="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]}'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":[["done"]]}' \
"$S/$ID/values/Sheet1!E2?valueInputOption=USER_ENTERED" | jq '.updatedCells'# New spreadsheet
curl -sS -X POST -H "$AUTH" -H "Content-Type: application/json" \
-d '{"properties":{"title":"Report 2026"}}' "$S" | jq '{spreadsheetId, spreadsheetUrl}'
# Add a tab via batchUpdate (addSheet request)
curl -sS -X POST -H "$AUTH" -H "Content-Type: application/json" \
-d '{"requests":[{"addSheet":{"properties":{"title":"Q3"}}}]}' \
"$S/$ID:batchUpdate" | jq '.replies'Sheet1!A1:D20'My Tab'!A1valueInputOption=RAWUSER_ENTERED=FORMULAvalues[[row1...],[row2...]]