---
name: gog-appscript
description: "Google Apps Script via the gog CLI: read project metadata and content, create projects, and run a deployed function. Use for Apps Script automation with JSON output. Running functions executes real code under the account's authority."
---

# gog appscript

Apps Script project operations with parseable output. Pick the account on every
call with `--account <email>` (or set `GOG_ACCOUNT`). Requires the Apps Script
API to be enabled for the account (see the user setting at
script.google.com/home/usersettings).

## Reads

```bash
gog --account you@example.com appscript get <scriptId> --json --wrap-untrusted
gog --account you@example.com appscript content <scriptId> --json --wrap-untrusted
```

## Writes / execute

```bash
gog --account you@example.com appscript create --title "Temp - script" --json
gog --account you@example.com appscript run <scriptId> --function myFunc --params-json '[1,2]' --json
```

## Safety

- `appscript run` **executes a deployed function** with the account's
  permissions and can cause real side effects — confirm the script id, function,
  and params, and run only what the user requested.
- stdout is data (`--json`/`--plain`); hints go to stderr. `--no-input` in automation.

## Discovery

`gog appscript --help` · `gog appscript <cmd> --help` · `gog schema appscript <cmd> --json`
Reference: <https://gogcli.sh/>
