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
累计下载
3,296
星标
3
全站排名
#3,439
全站前 68% · 「办公效率」前 58%
平台累计安装累计下载星标评论
ClawHub ↗942,9483-
SkillHub ↗1583,2963—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

该 CLI 支持读写、追加、批量操作、格式设置和工作表管理,使用服务账号认证,适合重复自动化任务;不支持终端用户 OAuth 流程。清空、删除工作表或批量更新可能改变数据,应限制服务账号权限并审查写操作。 需要 Node、经审核依赖与 lockfile,启用 Google Sheets API 并把目标共享给服务账号邮箱。优先显式配置凭据而非自动发现凭据文件,私钥不得进入日志。

资料发布于 2026-10-27

可以用来做什么

  • 读取或更新 Google Sheets 数据
  • 批量写入或调整工作表格式

什么时候用

  • 目标表格已授权给最小权限服务账号且写操作经过审核时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

读取指定范围并先展示将要返回的数据。
起草批量更新内容,但执行写入前等待确认。

月度数据趋势

累计下载3,296
1,9102,6553,3992026-03 · 累计下载 2,0132026-05 · 累计下载 2,4132026-06 · 累计下载 2,5472026-07 · 累计下载 2,7912026-08 · 累计下载 2,9572026-09 · 累计下载 3,29626-0326-09
星标3
2342026-03 · 星标 32026-05 · 星标 32026-06 · 星标 32026-07 · 星标 32026-08 · 星标 32026-09 · 星标 326-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,296—3
2026-082,957+5.9%3
2026-072,791+9.6%3
2026-062,547+5.6%3
2026-052,413—3
2026-032,013—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),按月更新。口径说明见数据方法。