codedao12

Google Sheets API

辦公效率v1.0.3
作者:codedao12更新於 2026-05-17google-sheets-api@clawhub_codedao12/google-sheets-api
表格處理#Google Sheets#Batch

據 AlphaMoat 統計,截至 2026-09,Google Sheets API 累計下載 4,259 次、獲 4 個星標,在全部 5,078 個 AI 技能中排名第 2,324 位,在「辦公效率」分類(435 個)中排名第 196 位。

累計安裝
126
累計下載
4259
星標
4
全站排名
#2,324
全站前 46% · 「辦公效率」前 46%
平台累計安裝累計下載星標評論
ClawHub ↗12639484-
SkillHub ↗12642594—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

它支援讀取、寫入、追加、批次操作、格式調整和工作表管理,也可將 JSON 資料用於命令列流程。寫入、清空、刪除工作表或原始批次命令可能改動或刪除資料;應先在非生產表格測試,並只授予目標表格所需許可權。服務賬號金鑰不得記錄或提交到程式碼庫。

資料釋出於 2026-10-29

可以用來做什麼

  • 讀取表格範圍並整理 JSON 輸出
  • 規劃批次更新或格式調整

什麼時候用

  • 服務賬號僅獲得所需表格許可權,並已明確只讀或修改範圍時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

擬定一個讀取指定表格範圍的命令,不要執行。
為批次更新準備安全檢查清單,包括目標範圍、備份和憑證保護。

月度資料趨勢

累計下載4259
3126373543432026-05 · 累計下載 32102026-06 · 累計下載 33652026-07 · 累計下載 36282026-08 · 累計下載 38212026-09 · 累計下載 425926-0526-09
星標4
3452026-05 · 星標 42026-06 · 星標 42026-07 · 星標 42026-08 · 星標 42026-09 · 星標 426-0526-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-094259—4
2026-083821+5.3%4
2026-073628+7.8%4
2026-063365+4.8%4
2026-053210—4

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

2.6 KB · ClawHub v1.0.3
---
name: google-sheet-api
description: OpenClaw skill that installs a Google Sheets CLI with setup steps and commands for read/write, batch, formatting, and sheet management.
---

# Google Sheets API Skill (Advanced)

## Purpose
Provide a production-ready Google Sheets CLI for OpenClaw. This skill supports data reads/writes, batch operations, formatting, and sheet management with service account authentication.
展開全部(共 89 行)
## Best fit
- You need a repeatable CLI for automation tasks.
- You want JSON-in/JSON-out for pipelines.
- You need more than basic read/write (formatting, sheet ops, batch updates).

## Not a fit
- You must use end-user OAuth consent flows (this skill is service-account focused).
- You only need lightweight, one-off edits.

## One-time setup
1. Create or select a Google Cloud project.
2. Enable the Google Sheets API.
3. Create a service account and download its JSON key.
4. Share target spreadsheets with the service account email.

## Install
```bash
cd google-sheet-api
npm install
```

## Run
```bash
node scripts/sheets-cli.js help
node scripts/sheets-cli.js read <spreadsheetId> "Sheet1!A1:C10"
node scripts/sheets-cli.js append <spreadsheetId> "Sheet1!A:B" '@data.json'
```

You can also use npm:
```bash
npm run sheets -- read <spreadsheetId> "Sheet1!A1:C10"
```

## Credentials
Supported sources (first match wins):
- `GOOGLE_SHEETS_CREDENTIALS_JSON` (inline JSON string)
- `GOOGLE_SERVICE_ACCOUNT_KEY` (file path)
- `GOOGLE_SHEETS_KEY_FILE` (file path)
- `GOOGLE_APPLICATION_CREDENTIALS` (file path)
- `./service-account.json`, `./credentials.json`, `./google-service-account.json`
- `~/.config/google-sheets/credentials.json`

## Input conventions
- JSON values can be inline or loaded from file using `@path`.
- Write/append expect a 2D array of values.

Example `data.json`:
```json
[["Name","Score"],["Alice",95]]
```

## Command map (high level)
Data:
- `read`, `write`, `append`, `clear`, `batchGet`, `batchWrite`

Formatting:
- `format`, `getFormat`, `borders`, `merge`, `unmerge`, `copyFormat`

Layout:
- `resize`, `autoResize`, `freeze`

Sheets:
- `create`, `info`, `addSheet`, `deleteSheet`, `renameSheet`

Advanced:
- `batch` (raw `spreadsheets.batchUpdate` requests)

## Operational guidance
- Prefer read-only scope for read workflows when possible.
- Add retry with exponential backoff for `429` and transient `5xx` errors.
- Keep request payloads small to avoid limit issues.

## Expected output
- JSON to stdout; non-zero exit code on errors.

## Security notes
- Never log or commit service account keys.
- Share spreadsheets only with the service account email required by this skill.

「辦公效率」分類下的熱門技能

codedao12 的其他技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。