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
累计下载
4,259
星标
4
全站排名
#2,324
全站前 46% · 「办公效率」前 46%
平台累计安装累计下载星标评论
ClawHub ↗1263,9484-
SkillHub ↗1264,2594—

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

这个技能是做什么的

它支持读取、写入、追加、批量操作、格式调整和工作表管理,也可将 JSON 数据用于命令行流程。写入、清空、删除工作表或原始批量命令可能改动或删除数据;应先在非生产表格测试,并只授予目标表格所需权限。服务账号密钥不得记录或提交到代码库。

资料发布于 2026-10-29

可以用来做什么

  • 读取表格范围并整理 JSON 输出
  • 规划批量更新或格式调整

什么时候用

  • 服务账号仅获得所需表格权限,并已明确只读或修改范围时

示例提示词

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

拟定一个读取指定表格范围的命令,不要执行。
为批量更新准备安全检查清单,包括目标范围、备份和凭证保护。

月度数据趋势

累计下载4,259
3,1263,7354,3432026-05 · 累计下载 3,2102026-06 · 累计下载 3,3652026-07 · 累计下载 3,6282026-08 · 累计下载 3,8212026-09 · 累计下载 4,25926-0526-09
星标4
3452026-05 · 星标 42026-06 · 星标 42026-07 · 星标 42026-08 · 星标 42026-09 · 星标 426-0526-09

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

月份累计下载环比星标
2026-094,259—4
2026-083,821+5.3%4
2026-073,628+7.8%4
2026-063,365+4.8%4
2026-053,210—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),按月更新。口径说明见数据方法。