Skip to content
Grok Build Skill · Google Sheets

Secure Grok Build Google Sheets Skill

Create, read, write, and share Google Sheets through one Grok Build skill — with PortEden enforcing scopes and audit on every cell mutation.

View on ClawHub

google-sheets · spreadsheets · data · permissions

SKILL.md · porteden-sheets · v1.0.0 · MIT-0

porteden sheets

Use porteden sheets for Google Sheets data operations and file management. Use -jc flags for AI-optimized output.

If porteden is not installed: brew install porteden/tap/porteden (or go install github.com/porteden/cli/cmd/porteden@latest).

Setup (once)

  • Browser login (recommended): porteden auth login — opens browser, credentials stored in system keyring
  • Direct token: porteden auth login --token <key> — stored in system keyring
  • Verify: porteden auth status
  • If PE_API_KEY is set in the environment, the CLI uses it automatically (no login needed).
  • Drive access requires a token with driveAccessEnabled: true and a connected Google account with Drive scopes.

Sheets commands (porteden sheets)

Data operations

  • Create new spreadsheet: porteden sheets create --name "Q1 Budget"
  • Create in folder: porteden sheets create --name "Data" --folder google:0B7_FOLDER
  • Spreadsheet metadata (tabs, dimensions): porteden sheets info google:SHEETID -jc
  • Read cell range: porteden sheets read google:SHEETID --range "Sheet1!A1:C10" -jc
  • Read whole sheet: porteden sheets read google:SHEETID --range "Sheet1" -jc
  • Write cells (JSON): porteden sheets write google:SHEETID --range "Sheet1!A1:B2" --values '[["Name","Score"],["Alice",95]]'
  • Write cells (CSV string): porteden sheets write google:SHEETID --range "Sheet1!A1:B2" --csv "Name,Score\nAlice,95"
  • Write cells (CSV file): porteden sheets write google:SHEETID --range "Sheet1!A1" --csv-file ./data.csv
  • Append rows (JSON): porteden sheets append google:SHEETID --range "Sheet1!A:B" --values '[["Bob",87]]'
  • Append rows (CSV): porteden sheets append google:SHEETID --range "Sheet1!A:B" --csv "Bob,87"

File management

  • Get export links (xlsx, pdf, csv): porteden sheets download google:SHEETID -jc
  • Share: porteden sheets share google:SHEETID --type user --role writer --email user@example.com
  • Share publicly: porteden sheets share google:SHEETID --type anyone --role reader
  • List permissions: porteden sheets permissions google:SHEETID -jc
  • Rename: porteden sheets rename google:SHEETID --name "Q2 Budget"
  • Delete (trash): porteden sheets delete google:SHEETID -y

Range format

  • Full range: Sheet1!A1:C10
  • Whole sheet: Sheet1
  • Open-ended (for append): Sheet1!A:B

Notes

  • Credentials persist in the system keyring after login. No repeated auth needed.
  • Set PE_PROFILE=work to avoid repeating --profile.
  • -jc is shorthand for --json --compact: strips noise, limits fields, reduces tokens for AI agents.
  • File IDs are always provider-prefixed (e.g., google:1BxiMVs0XRA5...). Pass them as-is.
  • --values, --csv, and --csv-file are mutually exclusive — provide exactly one.
  • --csv inline: use \n as row separator (e.g., "Name,Score\nAlice,95\nBob,87").
  • --raw flag disables formula evaluation (values written literally, not parsed as formulas).
  • porteden sheets download returns URLs only — no binary content is streamed.
  • accessInfo in responses describes active token restrictions.
  • delete moves to trash (reversible). Files can be restored from Google Drive trash.
  • Confirm before sharing or deleting.
  • Environment variables: PE_API_KEY, PE_PROFILE, PE_FORMAT, PE_COLOR, PE_VERBOSE.
What it does

The capability, in one paragraph

PortEden Sheets is the full-management surface for Google Sheets — create new spreadsheets, read ranges, write cell values, append rows, manage permissions, rename, delete, and export to xlsx, pdf, or csv. It's the right skill when the agent needs to do more than write — for example, generating a quarterly report from scratch, or rotating who can view a shared workbook. For pipelines that only append rows to a known sheet, use porteden-sheets-writer instead — it's a smaller surface tuned for high-volume writes.
Why it matters

Spreadsheets are the back-office logistics layer for most regulated workflows: client lists, deal pipelines, payroll runs, HR rosters. An autonomous agent that "tidies up" a sheet without policy guardrails is one bad merge away from a privacy incident. PortEden Sheets keeps every cell mutation in the audit log and refuses risky permission grants by default.

How it works

A few flags, predictable output

01

Range syntax matches Google Sheets

All read/write commands take A1-style ranges (Sheet1!A1:C10). Multi-tab sheets work without quoting; tab names with spaces should be wrapped ('Q4 Plan'!A1:Z).

02

Values vs formulas

write defaults to USER_ENTERED so formulas are interpreted (=SUM(A:A) becomes a formula). Pass --raw to write literal text into a cell that would otherwise be parsed.

porteden sheets write google:SHEETID \
--range "Sheet1!A1" \
--values '[["=SUM(B:B)"]]'
03

Export formats

download accepts --format xlsx | pdf | csv. PDF exports respect print settings (page size, headers/footers); CSV exports the active sheet by default unless --sheet is specified.

Install

Five minutes, three commands

1

Install the PortEden CLI

Grok Build skills delegate every API call to the porteden binary. Install once with Homebrew or Go — the agent runtime invokes it on your behalf.

brew install porteden/tap/porteden
# or
go install github.com/porteden/cli/cmd/porteden@latest
2

Authenticate

Browser-based login is recommended — credentials are written to your OS keyring. Token-based login is available for headless environments.

porteden auth login
# headless / CI
porteden auth login --token <PE_API_KEY>
porteden auth status
3

Add porteden-sheets to your Grok Build skills directory

Grok Build loads SKILL.md files from .grok/skills/. Drop the canonical SKILL.md into that directory and Grok picks it up on next session.

mkdir -p .grok/skills/porteden-sheets
curl -fsSL https://porteden.com/skills/grok-build/porteden-sheets/SKILL.md \
-o .grok/skills/porteden-sheets/SKILL.md
Try it on your data

Install Secure Grok Build Google Sheets Skill in five minutes. No credit card required.

Free tier covers personal Gmail, Outlook, Google Calendar, and Drive accounts. Upgrade for organization-wide policy and audit log.

See pricing
PortEden · v1.0.0 · MIT-0
Source on ClawHub

Install Secure Grok Build Google Sheets Skill Without Inheriting the Audit Tail

Browser auth, keyring-bound credentials, server-side audit log. The same data firewall behind every PortEden integration — wrapped for xAI's Grok Build runtime.

Talk to sales

Regulated org or 200+ seats? Talk to sales →