← Back to Skills Marketplace
porteden

Log Automation — Append log entries to Google Sheet

by PortEden · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
229
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install logger
Description
Log Automation — Append log entries, record audit trails, and automate event logging to a pre-configured Google Sheet by PortEden Secure access.
README (SKILL.md)

porteden sheets-logger

Append log entries to a Google Sheet with porteden sheets. This skill configures a target log spreadsheet via environment variable so agents can record events, activity logs, and audit trails 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 \x3Ckey> — 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. Set the target log sheet (one-time)

If PE_SHEET_ID is already set, skip to step 3 — the target sheet is configured.

If PE_SHEET_ID is not set, find the spreadsheet by name:

porteden drive files -q "Activity Log" --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:

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

To persist across sessions, add to your shell profile (~/.bashrc, ~/.zshrc) or .env file. Once set, this step does not need to be repeated.

3. Test the connection (one-time)

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. Once verified, skip this step in future runs.

4. Read the header row (one-time)

Before logging, confirm the column layout of the target sheet:

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

Match your log entries to this column order. Once you know the schema, skip this step in future runs.

Logging data

Append a log entry

Append adds rows after the last row with data. Existing log entries are never overwritten.

  • Single log entry:

    porteden sheets append $PE_SHEET_ID --range "Sheet1!A:E" --values '[["2025-01-15T09:30:00Z","deploy","production","v2.4.1 released","success"]]'
    
  • Multiple log entries (batch):

    porteden sheets append $PE_SHEET_ID --range "Sheet1!A:E" --values '[["2025-01-15T09:30:00Z","deploy","production","v2.4.1 released","success"],["2025-01-15T09:31:12Z","healthcheck","production","all endpoints healthy","success"]]'
    
  • Log entry from CSV string:

    porteden sheets append $PE_SHEET_ID --range "Sheet1!A:E" --csv "2025-01-15T09:30:00Z,deploy,production,v2.4.1 released,success"
    
  • Bulk log import from CSV file:

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

Verify logged entries

Read back recent rows to confirm the log was recorded:

porteden sheets read $PE_SHEET_ID --range "Sheet1" -jc

Log schema examples

Structure your log sheet with a header row. Common schemas:

Event log: Timestamp | Event | Source | Details | Status

Audit trail: Timestamp | Actor | Action | Resource | Before | After

Error log: Timestamp | Severity | Service | Message | Stack

Task log: Timestamp | Task | Agent | Input | Output | Duration

Best practices

  1. Always use append — logging is append-only by nature. Never use write to overwrite log entries.
  2. Include a timestamp in every entry — use ISO 8601 format (2025-01-15T09:30:00Z) for sortability and consistency.
  3. Use --raw for literal values — prevents unintended formula evaluation (e.g., log messages starting with =).
  4. Batch entries when possible — send multiple rows in one --values array rather than one-row-at-a-time to reduce API calls.
  5. Specify column range in append (e.g., A:E not just A) — ensures data lands in the correct columns.
  6. Read the header row first — confirm column order with porteden sheets read $PE_SHEET_ID --range "Sheet1!1:1" -jc before appending.
  7. Use -jc on read/info — compact JSON output minimizes tokens for AI agents.

Range format

  • Open-ended columns (for append): Sheet1!A:E
  • Specific cells: Sheet1!A1:E10
  • 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 \ as row separator (e.g., "ts,event,src\ ts2,event2,src2").
  • --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.
Usage Guidance
This skill appears to do what it says, but before installing: 1) Verify the porteden CLI source (review the GitHub repo and the brew tap/formula) to ensure you trust the publisher; 2) Restrict the PE_API_KEY token to the minimum Drive scopes needed (prefer a dedicated logging/service token or account); 3) Prefer storing credentials in the system keyring (recommended by the docs) rather than putting PE_API_KEY into ~/.bashrc/.zshrc/.env if you are worried about other processes or users reading your shell files; 4) Test against a non-production spreadsheet to confirm behavior; and 5) Be aware that using --csv-file will read local files you point it at — avoid pointing it at sensitive files unless intended.
Capability Analysis
Type: OpenClaw Skill Name: logger Version: 1.0.0 The 'logger' skill provides instructions for an AI agent to automate event logging to Google Sheets using the 'porteden' CLI tool. It outlines standard procedures for authentication, target configuration via environment variables (PE_API_KEY, PE_SHEET_ID), and data appending. The instructions in SKILL.md are transparent, align with the stated purpose, and do not contain evidence of data exfiltration, malicious execution, or prompt injection.
Capability Assessment
Purpose & Capability
The skill name/description describe appending logs to a Google Sheet and the SKILL.md exclusively invokes the 'porteden' CLI and the PE_API_KEY / PE_SHEET_ID env vars. Asking for the porteden binary and an API key + sheet ID is consistent with that purpose.
Instruction Scope
Runtime instructions remain focused on finding the sheet ID, reading header rows, and appending rows via the CLI. The doc suggests persisting PE_SHEET_ID/PE_PROFILE into shell profiles or a .env file and supports reading a local CSV file for bulk import — both are expected for this workflow but are user-visible actions that persist credentials or read local files, so users should be aware they may expose the token if stored insecurely.
Install Mechanism
Install options are brew (porteden/tap/porteden) and go install from github.com/porteden/cli. Both are standard installers; the brew entry is a third-party tap (porteden/tap) rather than an official core formula — reasonable but the user should review the tap/formula and the GitHub repo before installing.
Credentials
Only PE_API_KEY (primary) and PE_SHEET_ID are required. These are appropriate for a CLI that authenticates to PortEden and targets a specific spreadsheet. The documentation correctly notes token scope requirements (Drive access).
Persistence & Privilege
The skill does not request always:true and does not attempt to modify other skills or system-wide agent settings. It recommends storing credentials in the system keyring or shell profiles (user actions), which is normal for a CLI but should be done carefully by the user.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install logger
  3. After installation, invoke the skill by name or use /logger
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of logger — Google Sheets log automation skill. - Enables append-only event/audit logging to a Google Sheet using PortEden Secure CLI. - Supports batch logging, CSV import, and AI-optimized JSON output with `-jc`. - Configuration via environment variables (`PE_API_KEY`, `PE_SHEET_ID`) for seamless agent integration. - Includes setup, schema guidance, and append best practices to ensure robust logging. - Log entries never overwrite existing data; always appended after last data row.
Metadata
Slug logger
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Log Automation — Append log entries to Google Sheet?

Log Automation — Append log entries, record audit trails, and automate event logging to a pre-configured Google Sheet by PortEden Secure access. It is an AI Agent Skill for Claude Code / OpenClaw, with 229 downloads so far.

How do I install Log Automation — Append log entries to Google Sheet?

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

Is Log Automation — Append log entries to Google Sheet free?

Yes, Log Automation — Append log entries to Google Sheet is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Log Automation — Append log entries to Google Sheet support?

Log Automation — Append log entries to Google Sheet is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Log Automation — Append log entries to Google Sheet?

It is built and maintained by PortEden (@porteden); the current version is v1.0.0.

💬 Comments