Apps Script
Apps Script has 5 operations in gum's generated catalog. Start with search when you know the task, use describe to inspect request fields and scopes, then dispatch through the command that matches the operation risk class.
| Count | Value |
|---|---|
| Family | Workspace documents |
| Operations | 5 |
| Risk classes | 3 read, 2 write |
| Auth strategies | 5 byo_oauth |
Start here
gum search "apps script"
gum describe script.projects.deployments.list
gum read script.projects.deployments.list --args '{"scriptId":"<scriptId>"}' --output jsonFor write-class operations, gum requires the write command and an explicit write gate:
gum describe script.projects.create
gum write script.projects.create --allow-write --args '{"fields":"id"}'Auth
Auth strategies in this service: 5 byo_oauth. Authenticate the strategy used by the operation you plan to call.
Bring-your-own OAuth
- In Google Cloud, enable Apps Script API.
- Configure the OAuth consent screen. Add your Google account as a test user when the app is still in testing mode.
- Create an OAuth client ID with application type
Desktop app. - Add the scopes this service needs to the consent screen.
- Store the client in gum:
printf '%s' "$GOOGLE_OAUTH_CLIENT_SECRET" \
| gum auth use-oauth-client --client-id "$GOOGLE_OAUTH_CLIENT_ID" --secret-stdin- Authorize this service:
gum login --service script- Verify the grant before dispatch:
gum auth status --scopes script.deployments,script.projects,script.projects.readonly
gum describe script.projects.deployments.listScopes used by these operations:
https://www.googleapis.com/auth/script.deploymentshttps://www.googleapis.com/auth/script.projectshttps://www.googleapis.com/auth/script.projects.readonly
Service setup notes: Apps Script auth guide.
Operations
| Operation | Risk | Auth | Summary |
|---|---|---|---|
script.projects.create |
write |
byo_oauth |
Create a new (standalone) Apps Script project (args.body.title). |
script.projects.deployments.list |
read |
byo_oauth |
List the deployments of an Apps Script project. |
script.projects.get |
read |
byo_oauth |
Fetch an Apps Script project's metadata by scriptId. |
script.projects.getContent |
read |
byo_oauth |
Fetch the source files of an Apps Script project. |
script.projects.updateContent |
write |
byo_oauth |
Replace the source files of an Apps Script project (args.body.files). |
Next
- Use API workflows for search, describe, invoke, and error handling.
- Use Auth guides for service-specific Google setup.
- Use Command index for CLI flags and generated help.
