| name | google-sheets |
| description | Read and write Google Sheets data. Create spreadsheets, update cells, and manage worksheets via Sheets API. |
| metadata | {"thinkfleetbot":{"emoji":"📊","requires":{"env":["GOOGLE_ACCESS_TOKEN"]}}} |
Google Sheets
Spreadsheet automation.
Environment
export GOOGLE_ACCESS_TOKEN="ya29.xxxxxxxxxx"
Read Sheet Data
curl "https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/Sheet1!A1:D10" \
-H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN"
Write to Cells
curl -X PUT "https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/Sheet1!A1:B2?valueInputOption=USER_ENTERED" \
-H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"values": [["Name", "Score"], ["Alice", 95]]}'
Append Rows
curl -X POST "https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/Sheet1!A:D:append?valueInputOption=USER_ENTERED" \
-H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d