/install google-sheet
Google Sheets Skill
Interact with Google Sheets using a service account.
Setup (One-time)
-
Google Cloud Console:
- Create/select a project
- Enable "Google Sheets API"
- Create a Service Account (IAM → Service Accounts → Create)
- Download JSON key
-
Configure credentials (one of these):
- Set env:
GOOGLE_SERVICE_ACCOUNT_KEY=/path/to/key.json - Place
service-account.jsonorcredentials.jsonin the skill directory - Place in
~/.config/google-sheets/credentials.json
- Set env:
-
Share sheets with the service account email (found in JSON key as
client_email) -
Install dependencies:
cd skills/google-sheets && npm install
Usage
node scripts/sheets.js \x3Ccommand> [args]
Commands
Data Operations
| Command | Args | Description |
|---|---|---|
read |
\x3Cid> \x3Crange> |
Read cells |
write |
\x3Cid> \x3Crange> \x3Cjson> |
Write data |
append |
\x3Cid> \x3Crange> \x3Cjson> |
Append rows |
clear |
\x3Cid> \x3Crange> |
Clear range |
Formatting
| Command | Args | Description |
|---|---|---|
format |
\x3Cid> \x3Crange> \x3CformatJson> |
Format cells |
getFormat |
\x3Cid> \x3Crange> |
Get cell formats |
borders |
\x3Cid> \x3Crange> [styleJson] |
Add borders |
copyFormat |
\x3Cid> \x3Csource> \x3Cdest> |
Copy format between ranges |
merge |
\x3Cid> \x3Crange> |
Merge cells |
unmerge |
\x3Cid> \x3Crange> |
Unmerge cells |
Layout
| Command | Args | Description |
|---|---|---|
resize |
\x3Cid> \x3Csheet> \x3Ccols|rows> \x3Cstart> \x3Cend> \x3Cpx> |
Resize columns/rows |
autoResize |
\x3Cid> \x3Csheet> \x3CstartCol> \x3CendCol> |
Auto-fit columns |
freeze |
\x3Cid> \x3Csheet> [rows] [cols] |
Freeze rows/columns |
Sheet Management
| Command | Args | Description |
|---|---|---|
create |
\x3Ctitle> |
Create spreadsheet |
info |
\x3Cid> |
Get metadata |
addSheet |
\x3Cid> \x3Ctitle> |
Add sheet tab |
deleteSheet |
\x3Cid> \x3CsheetName> |
Delete sheet tab |
renameSheet |
\x3Cid> \x3ColdName> \x3CnewName> |
Rename sheet tab |
Examples
# Read data
node scripts/sheets.js read "SPREADSHEET_ID" "Sheet1!A1:C10"
# Write data
node scripts/sheets.js write "SPREADSHEET_ID" "Sheet1!A1:B2" '[["Name","Score"],["Alice",95]]'
# Format cells (yellow bg, bold)
node scripts/sheets.js format "SPREADSHEET_ID" "Sheet1!A1:B2" '{"backgroundColor":{"red":255,"green":255,"blue":0},"textFormat":{"bold":true}}'
# Copy format from one range to another
node scripts/sheets.js copyFormat "SPREADSHEET_ID" "Sheet1!A1:C3" "Sheet1!D1:F3"
# Add borders
node scripts/sheets.js borders "SPREADSHEET_ID" "Sheet1!A1:C3"
# Resize columns to 150px
node scripts/sheets.js resize "SPREADSHEET_ID" "Sheet1" cols A C 150
# Auto-fit column widths
node scripts/sheets.js autoResize "SPREADSHEET_ID" "Sheet1" A Z
# Freeze first row and column
node scripts/sheets.js freeze "SPREADSHEET_ID" "Sheet1" 1 1
# Add new sheet tab
node scripts/sheets.js addSheet "SPREADSHEET_ID" "NewSheet"
Format Options
{
"backgroundColor": {"red": 255, "green": 255, "blue": 0},
"textFormat": {
"bold": true,
"italic": false,
"fontSize": 12,
"foregroundColor": {"red": 0, "green": 0, "blue": 0}
},
"horizontalAlignment": "CENTER",
"verticalAlignment": "MIDDLE",
"wrapStrategy": "WRAP"
}
Border Style
{
"style": "SOLID",
"color": {"red": 0, "green": 0, "blue": 0}
}
Border styles: DOTTED, DASHED, SOLID, SOLID_MEDIUM, SOLID_THICK, DOUBLE
Finding Spreadsheet ID
From URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit
Troubleshooting
- 403 Forbidden: Sheet not shared with service account email
- 404 Not Found: Wrong spreadsheet ID or sheet name
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install google-sheet - After installation, invoke the skill by name or use
/google-sheet - Provide required inputs per the skill's parameter spec and get structured output
What is Skill to manage and update google sheet?
Read, write, append, and manage Google Sheets via the Google Sheets API (Node.js SDK). Use when you need to interact with spreadsheets — reading data, writing/updating cells, appending rows, clearing ranges, formatting cells, managing sheets. Requires a Google Cloud service account with Sheets API enabled. It is an AI Agent Skill for Claude Code / OpenClaw, with 2938 downloads so far.
How do I install Skill to manage and update google sheet?
Run "/install google-sheet" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Skill to manage and update google sheet free?
Yes, Skill to manage and update google sheet is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Skill to manage and update google sheet support?
Skill to manage and update google sheet is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Skill to manage and update google sheet?
It is built and maintained by longmaba (@longmaba); the current version is v1.0.0.