codedao12

Google Sheet API

辦公效率v1.0.1
作者:codedao12更新於 2026-05-11共 2 個版本 · 最新版本釋出於 2026-02-02google-sheet-api@clawhub_codedao12/google-sheet-api
表格處理#Google Sheets#Batch

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

累計安裝
158
累計下載
3296
星標
3
全站排名
#3,439
全站前 68% · 「辦公效率」前 58%
平台累計安裝累計下載星標評論
ClawHub ↗9429483-
SkillHub ↗15832963—

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

這個技能是做什麼的

該 CLI 支援讀寫、追加、批次操作、格式設定和工作表管理,使用服務帳戶認證,適合重複自動化任務;不支援終端使用者 OAuth 流程。清空、刪除工作表或批次更新可能改變資料,應限制服務帳戶權限並審查寫操作。 需要 Node、經審核的依賴與 lockfile,啟用 Google Sheets API 並把目標共用給服務帳戶電子郵件。優先明確設定憑證,避免自動探索憑證檔案,私密金鑰不得進入紀錄。

資料釋出於 2026-10-27

可以用來做什麼

  • 讀取或更新 Google Sheets 資料
  • 批次寫入或調整工作表格式

什麼時候用

  • 目標表格已授權給最小權限服務帳戶且寫操作經過審核時

示例提示詞

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

讀取指定範圍並先展示將要返回的資料。
起草批次更新內容,但執行寫入前等待確認。

月度資料趨勢

累計下載3296
1910265533992026-03 · 累計下載 20132026-05 · 累計下載 24132026-06 · 累計下載 25472026-07 · 累計下載 27912026-08 · 累計下載 29572026-09 · 累計下載 329626-0326-09
星標3
2342026-03 · 星標 32026-05 · 星標 32026-06 · 星標 32026-07 · 星標 32026-08 · 星標 32026-09 · 星標 326-0326-09

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

月份累計下載環比星標
2026-093296—3
2026-082957+5.9%3
2026-072791+9.6%3
2026-062547+5.6%3
2026-052413—3
2026-032013—3

SKILL.md 原文

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

2.6 KB · ClawHub v1.0.1
---
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),按月更新。口徑說明見資料方法。