Google Sheets File Automation

v1.0.0

Automated Google Sheets Data Writer — Append rows, update cells, and automate spreadsheet data pipelines with a pre-configured target sheet.

0· 212·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for porteden/porteden-sheets-writer.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Google Sheets File Automation" (porteden/porteden-sheets-writer) from ClawHub.
Skill page: https://clawhub.ai/porteden/porteden-sheets-writer
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: PE_API_KEY, PE_SHEET_ID
Required binaries: porteden
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install porteden-sheets-writer

ClawHub CLI

Package manager switcher

npx clawhub@latest install porteden-sheets-writer
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description (Google Sheets writer) match the declared requirements: a porteden CLI binary, PE_API_KEY (primary credential) and PE_SHEET_ID. These are exactly what a CLI-based Sheets automation tool would need.
Instruction Scope
SKILL.md contains direct CLI instructions for authenticating, locating a spreadsheet, reading, writing, and appending ranges. It does not instruct the agent to read unrelated system files or other secrets. It does recommend persisting PE_SHEET_ID in shell profiles or using system keyring for tokens — standard for a CLI tool but user-visible and explicit.
Install Mechanism
Install options are a Homebrew formula (porteden/tap/porteden) or a Go 'go install' module matching github.com/porteden/cli. Both are typical installation methods for a CLI and are proportionate to the skill's stated needs. No arbitrary downloads or unknown short URLs are used.
Credentials
Requested environment variables (PE_API_KEY as primary, PE_SHEET_ID and optional PE_PROFILE/PE_FORMAT/etc.) align with the functionality. The skill requires Drive access scopes for Google tokens (documented). It does not request unrelated credentials or system secrets.
Persistence & Privilege
The skill is not always-enabled and does not request elevated platform privileges. It stores tokens in the system keyring (per SKILL.md), which is a normal behavior for CLIs. Model invocation remains allowed (default), which is expected for an invocable skill.
Assessment
This skill appears coherent, but before installing: 1) Verify you trust the 'porteden' project and the Homebrew tap or GitHub module (confirm the repo and release integrity). 2) Limit the API key's permissions (grant only what the CLI needs; ensure Drive/Sheets scopes are narrow). 3) Prefer browser-based auth (system keyring) over placing PE_API_KEY in shell profiles or .env if you want less secret exposure. 4) If you must store PE_SHEET_ID in shell startup files, be aware those files are readable by processes that can read your environment. 5) After testing, rotate or revoke the token if you no longer use the skill. If you want a deeper check, provide the Homebrew formula URL or the GitHub repo contents so they can be audited for unexpected behavior.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🤖 Clawdis
Binsporteden
EnvPE_API_KEY, PE_SHEET_ID
Primary envPE_API_KEY

Install

Install porteden (brew)
Bins: porteden
brew install porteden/tap/porteden
Install porteden (go)
Bins: porteden
go install github.com/porteden/cli/cmd/porteden@latest
latestvk97075d5qmqkm2e4x77kx3mdys8358cf
212downloads
0stars
1versions
Updated 4w ago
v1.0.0
MIT-0

porteden sheets-writer

Automate Google Sheets updates with porteden sheets. This skill configures a target spreadsheet via environment variable so agents can append rows and write data without repeating the file ID. 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

1. Authenticate (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.

2. Find and set the target spreadsheet

Search for the spreadsheet by name:

porteden drive files -q "Q1 Budget" --mime-type application/vnd.google-apps.spreadsheet -jc

Copy the id field from the result (already provider-prefixed, e.g., google:1BxiMVs0XRA5...) and set it as the target:

export PE_SHEET_ID="google:1BxiMVs0XRA5nFMdKvBdBZjgmU..."

To persist across sessions, add to your shell profile (~/.bashrc, ~/.zshrc) or .env file.

3. Test the connection

porteden sheets info $PE_SHEET_ID -jc

Expected: returns spreadsheet title, sheet tabs, and dimensions. If this fails, verify the file ID and that your token has Drive access.

Writing data

Append rows (primary automation operation)

Append adds rows after the last row with data in the target range. This is the recommended operation for automation — it never overwrites existing data.

  • Append from JSON:

    porteden sheets append $PE_SHEET_ID --range "Sheet1!A:D" --values '[["2025-01-15","Order #1042","Shipped",29.99]]'
    
  • Append multiple rows:

    porteden sheets append $PE_SHEET_ID --range "Sheet1!A:D" --values '[["2025-01-15","Order #1042","Shipped",29.99],["2025-01-16","Order #1043","Processing",45.50]]'
    
  • Append from CSV string:

    porteden sheets append $PE_SHEET_ID --range "Sheet1!A:D" --csv "2025-01-15,Order #1042,Shipped,29.99"
    
  • Append from CSV file:

    porteden sheets append $PE_SHEET_ID --range "Sheet1!A:D" --csv-file ./new_rows.csv
    

Write to specific cells

Write replaces the exact range specified. Use for updating known cells or overwriting a section.

  • Write a single cell:

    porteden sheets write $PE_SHEET_ID --range "Sheet1!E2" --values '[["Complete"]]'
    
  • Write a block:

    porteden sheets write $PE_SHEET_ID --range "Sheet1!A1:C2" --values '[["Name","Status","Score"],["Alice","Done",95]]'
    
  • Write from CSV file:

    porteden sheets write $PE_SHEET_ID --range "Sheet1!A1" --csv-file ./data.csv
    

Read for verification

After writing, confirm the data landed correctly:

porteden sheets read $PE_SHEET_ID --range "Sheet1!A1:D10" -jc

Automation best practices

  1. Always use append for new rows — avoids overwriting existing data. Use write only for targeted cell updates.
  2. Specify column range in append (e.g., A:D not just A) — ensures data lands in the correct columns.
  3. Use --raw for literal values — prevents unintended formula evaluation (e.g., strings starting with =).
  4. Verify after write — read the range back to confirm data integrity in critical workflows.
  5. Use -jc on read/info — compact JSON output minimizes tokens for AI agents.
  6. Batch rows in a single append — send multiple rows in one --values array rather than one-row-at-a-time.
  7. Match column order to the sheet header — check with porteden sheets read $PE_SHEET_ID --range "Sheet1!1:1" -jc to read the header row first.

Range format

  • Open-ended columns (for append): Sheet1!A:D
  • Specific cells: Sheet1!A1:C10
  • Single cell: Sheet1!E2
  • Whole sheet: Sheet1
  • Header row only: Sheet1!1:1

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).
  • accessInfo in responses describes active token restrictions.
  • Environment variables: PE_API_KEY, PE_PROFILE, PE_SHEET_ID, PE_FORMAT, PE_COLOR, PE_VERBOSE.

Comments

Loading comments...