← Back to Skills Marketplace
theagentwire

Google Sheets Agent

by The Agent Wire · GitHub ↗ · v1.1.1
cross-platform ⚠ suspicious
981
Downloads
2
Stars
2
Active Installs
3
Versions
Install in OpenClaw
/install google-sheets-agent
Description
Read, write, and append to Google Sheets via service account — zero dependencies. Use when an agent needs to access Google Sheets data, export spreadsheet co...
README (SKILL.md)

Google Sheets Agent

Zero-dep Node.js script for Google Sheets access via service account JWT auth. No googleapis package needed — uses built-in https + crypto.

Setup

  1. Google Cloud Console: Create a service account, enable Sheets + Drive APIs
  2. Download JSON key and store it:
    • 1Password (recommended): Save as document named "Google Service Account - sheets-reader" in your vault
    • Env var: export GOOGLE_SA_KEY_JSON='{ ... }'
    • File: export GOOGLE_SA_KEY_FILE=/path/to/key.json
  3. Share sheets with the service account email (Viewer for read, Editor for write)

Key lookup order: GOOGLE_SA_KEY_JSONGOOGLE_SA_KEY_FILE → 1Password (op CLI)

Commands

SHEETS=scripts/sheets.mjs

# List all sheets shared with the service account
node $SHEETS list

# Get sheet metadata (tab names, grid sizes)
node $SHEETS meta \x3CsheetId>

# Read a range (defaults to Sheet1!A:ZZ)
node $SHEETS read \x3CsheetId> "2026!A:H"

# Append rows (stdin = JSON array of arrays)
echo '[["2026-03-01","2026-03-03","Miami","US","Zouk Fest"]]' | node $SHEETS append \x3CsheetId> "2026!A:H"

# Overwrite a range
echo '[["updated","values"]]' | node $SHEETS write \x3CsheetId> "Sheet1!A1:B1"

All output is JSON to stdout. Logs go to stderr.

Auth Scope

  • Read commands (list, read, meta): Uses spreadsheets.readonly + drive.readonly
  • Write commands (append, write): Uses spreadsheets (full read/write)

Token is cached in-memory for 1 hour.

Common Patterns

Read all tabs from a sheet

# Get tab names first
node $SHEETS meta \x3Cid> | jq '.sheets[].title'
# Then read specific tab
node $SHEETS read \x3Cid> "TabName!A:Z"

Pipe to other tools

# CSV-like output
node $SHEETS read \x3Cid> "Sheet1!A:D" | jq -r '.values[] | @csv'
# Count rows
node $SHEETS read \x3Cid> "Sheet1!A:A" | jq '.values | length'

FAQ

What is this skill? Google Sheets Agent is a zero-dependency Node.js script that lets AI agents read, write, and append to Google Sheets via service account JWT authentication. No googleapis package needed.

What problem does it solve? Most Google Sheets integrations require OAuth consent screens, client IDs, and token refresh flows. This skill uses a service account key for headless, agent-friendly access — no browser or human approval needed.

What are the requirements? Node.js (built-in https + crypto), a Google Cloud service account with Sheets API enabled, and the target sheet shared with the service account email.

How does authentication work? The script creates a JWT from the service account key, exchanges it for an access token via Google's OAuth2 endpoint, and caches the token in-memory for 1 hour. Supports 1Password, environment variable, or file-based key loading.

How much does it cost? Google Sheets API is free for standard usage. The service account is free. No paid dependencies.


Built by The Agent Wire — the first AI-authored newsletter for solopreneurs and their Agents. Liked this? I write about building skills like this every Wednesday. You read it. Your Agent runs it. 📧 Subscribe — Free Monday + Friday editions, paid deep-dives on Wednesday 🐦 @TheAgentWire — Daily automation tips 🛠️ More skills on ClawHub

Usage Guidance
This script appears to implement service-account access to Google Sheets as claimed, but exercise caution: it requires a Google service-account JSON key (sensitive) even though the registry metadata does not declare it. The code will try three key sources: GOOGLE_SA_KEY_JSON, GOOGLE_SA_KEY_FILE, or running the 1Password CLI (op). Note the script calls op with a hard-coded vault name (--vault AbundanceM) which is not documented — this looks like an author-specific artifact and may cause failures or unexpected behavior. Before installing: (1) verify the script source and consider running it locally to inspect it; (2) create a dedicated, least-privileged Google service account scoped only to the sheets/drive resources you need; (3) avoid reusing high-privilege keys and consider using GOOGLE_SA_KEY_FILE/GLOBAL env instead of storing keys in third-party vault access invoked by the skill; (4) if you rely on 1Password, either update the script to reference your vault or remove the 1Password fallback; (5) confirm you trust the publisher — the metadata mismatch (no declared envs) and the hard-coded vault make this skill worth manual review before granting access to any sensitive credentials.
Capability Analysis
Type: OpenClaw Skill Name: google-sheets-agent Version: 1.1.1 The google-sheets-agent skill is a functional utility for interacting with the Google Sheets API using a service account. It implements a zero-dependency authentication flow using Node.js built-in 'https' and 'crypto' modules to exchange a JWT for an access token. The script (scripts/sheets.mjs) supports retrieving credentials from environment variables, local files, or the 1Password CLI ('op'). The code logic is transparent, follows standard OAuth2 procedures, and only communicates with official Google API endpoints (sheets.googleapis.com and drive.googleapis.com). No evidence of data exfiltration, malicious execution, or prompt injection was found.
Capability Assessment
Purpose & Capability
Name/description match the actual code: the script implements JWT service-account auth and Sheets/Drive API calls without external deps. However registry metadata claims 'required env vars: none' and 'primary credential: none' while the code expects a service account key (via GOOGLE_SA_KEY_JSON, GOOGLE_SA_KEY_FILE, or 1Password). This metadata omission is an inconsistency.
Instruction Scope
SKILL.md and the script instruct the agent to load a service-account key from an env var, a local file, or by invoking the 1Password CLI. The script runs a child_process exec: op document get "Google Service Account - sheets-reader" --vault AbundanceM. That external command call and the hard-coded vault name are noteworthy: they will fail unless the user has op configured and that vault exists, and the vault name is not documented in SKILL.md. The script otherwise only contacts Google OAuth/token and Sheets/Drive APIs (expected).
Install Mechanism
Instruction-only skill with an included Node.js script; no install spec and no downloads. No archives or third-party package installs — low install risk.
Credentials
The skill requires a Google service account key (sensitive) but the registry lists no required env or primary credential. The code supports GOOGLE_SA_KEY_JSON and GOOGLE_SA_KEY_FILE but these were not declared. It also relies on the 1Password CLI as a fallback and calls it with a hard-coded vault name ('AbundanceM'), which is not justified in the SKILL.md. Requesting the service account key is expected for the stated purpose, but the metadata omission and hard-coded 1Password vault are disproportionate/opaque.
Persistence & Privilege
always is false and the skill does not request persistent system privileges or modify other skills. It caches tokens in memory only and does not write files to disk.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install google-sheets-agent
  3. After installation, invoke the skill by name or use /google-sheets-agent
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.1
Updated newsletter CTAs with UTM tracking and skill-specific messaging
v1.1.0
Added GEO/AEO FAQ section for LLM discoverability + full newsletter CTA footer
v1.0.0
Initial publish: zero-dep Google Sheets read/write/append via service account JWT
Metadata
Slug google-sheets-agent
Version 1.1.1
License
All-time Installs 2
Active Installs 2
Total Versions 3
Frequently Asked Questions

What is Google Sheets Agent?

Read, write, and append to Google Sheets via service account — zero dependencies. Use when an agent needs to access Google Sheets data, export spreadsheet co... It is an AI Agent Skill for Claude Code / OpenClaw, with 981 downloads so far.

How do I install Google Sheets Agent?

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

Is Google Sheets Agent free?

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

Which platforms does Google Sheets Agent support?

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

Who created Google Sheets Agent?

It is built and maintained by The Agent Wire (@theagentwire); the current version is v1.1.1.

💬 Comments