← Back to Skills Marketplace
codedao12

Google Sheets API

by codedao12 · GitHub ↗ · v1.0.3
cross-platform ⚠ suspicious
2683
Downloads
4
Stars
12
Active Installs
1
Versions
Install in OpenClaw
/install google-sheets-api
Description
OpenClaw skill that installs a Google Sheets CLI with setup steps and commands for read/write, batch, formatting, and sheet management.
README (SKILL.md)

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.

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

cd google-sheet-api
npm install

Run

node scripts/sheets-cli.js help
node scripts/sheets-cli.js read \x3CspreadsheetId> "Sheet1!A1:C10"
node scripts/sheets-cli.js append \x3CspreadsheetId> "Sheet1!A:B" '@data.json'

You can also use npm:

npm run sheets -- read \x3CspreadsheetId> "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:

[["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.
Usage Guidance
This skill appears to be a genuine Google Sheets CLI, but check a few things before installing: 1) Confirm which environment variable you will supply (the code and docs disagree slightly) and ensure you use a dedicated, least-privilege service account key (read-only scope for read tasks). 2) Don't place broad/owner credentials in project files or repos; keep the JSON key out of version control and prefer a limited-scope service account. 3) The package pulls googleapis from npm — run npm install in a controlled environment, verify package versions, and consider auditing node_modules or using integrity checks. 4) Because the CLI checks for credential files in the current directory and your home directory, be aware it may pick up any keys present there; remove or relocate keys you don't want the skill to access. 5) The code contains minor env-name inconsistencies (possible typo) — test credential loading locally before using in production. If you need higher assurance, run the CLI inside a restricted container or VM and review the full scripts/sheets-cli.js file yourself.
Capability Analysis
Type: OpenClaw Skill Name: google-sheets-api Version: 1.0.3 The skill is classified as suspicious due to its implementation of credential discovery, which involves reading sensitive files from various locations, including `~/.config/google-sheets/credentials.json` (as seen in `scripts/sheets-cli.js`). While this file access is plausibly needed for the skill's stated purpose of authenticating to the Google Sheets API, it represents a high-risk capability. There is no clear evidence of intentional malicious behavior such as exfiltration of these credentials to unauthorized endpoints or other unrelated sensitive data, nor are there any prompt injection attempts in `SKILL.md` to mislead the agent into harmful actions. However, the broad file access for credentials, even if for a legitimate purpose, elevates it beyond benign.
Capability Assessment
Purpose & Capability
The skill's name, description, SKILL.md, package.json, and scripts/sheets-cli.js all align: this is a CLI for the Google Sheets API (reads/writes, batch, formatting, sheet management) using the googleapis npm package and service-account credentials.
Instruction Scope
The runtime instructions are reasonable for the stated purpose (npm install; run node scripts/sheets-cli.js). The CLI will search for credentials in env vars and on-disk locations (cwd and the user's home config path) as expected for a service-account-driven tool. There is a small inconsistency between the documented env names and the code (the code checks GOOGLE_SHEETS_CREDENTIALS_JSON and also GOOGLE_SERVICE_ACCOUNT_JSON — the latter looks like a typo compared to env_example.md which uses GOOGLE_SERVICE_ACCOUNT_KEY). This mismatch could cause confusion or failure to load credentials.
Install Mechanism
There is no platform install spec, but package.json exists and SKILL.md instructs users to run npm install. That will pull the googleapis package from npm (expected). The lack of an explicit install entry in the registry metadata means install will be manual; verify npm network retrieval and consider pinning/checking package integrity before running.
Credentials
The skill legitimately needs Google service-account credentials, but the registry metadata lists no required env vars or primary credential while the SKILL.md and code expect credentials from multiple env vars or files. The code checks several on-disk locations (including ~/.config/google-sheets/credentials.json), which is reasonable but broad — the registry should have declared the credential requirement and the exact env names. Confirm which env var you will use and do not supply higher-privilege credentials than necessary.
Persistence & Privilege
The skill does not request always:true and does not appear to modify other skills or system-wide settings. It runs as a normal CLI and only uses the Google API client; autonomous invocation is the platform default but not a new privilege here.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install google-sheets-api
  3. After installation, invoke the skill by name or use /google-sheets-api
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.3
- Improved documentation with detailed setup, install, and usage instructions for the Google Sheets CLI. - Clarified features: supports read/write, batch, formatting, and sheet management using service account authentication. - Added comprehensive credential loading order and input conventions. - Expanded command list for data operations, formatting, sheet management, and advanced batch updates. - Included security guidance and best practices for operational use.
Metadata
Slug google-sheets-api
Version 1.0.3
License
All-time Installs 12
Active Installs 12
Total Versions 1
Frequently Asked Questions

What is Google Sheets API?

OpenClaw skill that installs a Google Sheets CLI with setup steps and commands for read/write, batch, formatting, and sheet management. It is an AI Agent Skill for Claude Code / OpenClaw, with 2683 downloads so far.

How do I install Google Sheets API?

Run "/install google-sheets-api" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Google Sheets API free?

Yes, Google Sheets API is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Google Sheets API support?

Google Sheets API is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Google Sheets API?

It is built and maintained by codedao12 (@codedao12); the current version is v1.0.3.

💬 Comments