Q

Quick Gws Apps Script

Streamline your workflow with this google, apps, script, upload. Includes structured workflows, validation checks, and reusable patterns for google workspace.

CommandClipticsgoogle workspacev1.0.0MIT
0 views0 copies

Quick GWS Apps Script

Deploy and manage Google Apps Script projects directly from the command line.

When to Use This Command

Run this command when you need to:

  • Deploy an Apps Script project to Google Workspace without opening the browser-based editor
  • Push local script files to an existing Apps Script project for version-controlled development
  • Manage script triggers, deployments, and execution logs from your terminal

Consider alternatives when:

  • You are writing a new script from scratch and prefer the browser editor with autocomplete
  • You need to debug scripts interactively with breakpoints using the Apps Script debugger

Quick Start

Configuration

name: quick-gws-apps-script type: command category: google-workspace

Example Invocation

claude command:run quick-gws-apps-script --action deploy --project-id "1a2b3c4d" --version "v2.1"

Example Output

Connecting to Apps Script project...
  Project ID: 1a2b3c4d
  Project name: Invoice Automation
  Current version: v2.0

Pushing local files...
  Code.gs         (updated)
  Triggers.gs     (updated)
  appsscript.json (no changes)

Creating deployment v2.1...
  Deployment ID: AKfycbx...
  Web app URL: https://script.google.com/macros/s/AKfycbx.../exec
  Status: ACTIVE

Deployment complete. 2 files updated, 1 deployment created.

Core Concepts

Apps Script Management Overview

AspectDetails
File SyncPush and pull .gs and .html files between local filesystem and Apps Script
DeploymentsCreate versioned deployments for web apps, add-ons, or API executables
TriggersManage time-driven, event-driven, and installable triggers remotely
LoggingRetrieve execution logs and error reports from the Stackdriver integration
ManifestsManage appsscript.json for OAuth scopes, runtime version, and config

Deployment Workflow

Local Files (.gs, .html)
        |
        v
Push to Apps Script
        |
        v
Create New Version
        |
        v
Create Deployment
  |          |
  v          v
Web App    API Exec
  |          |
  v          v
Serve URL  Callable

Configuration

ParameterTypeDefaultDescription
actionstring(required)Action: push, pull, deploy, logs, triggers
project-idstring(required)Apps Script project ID from the script URL
versionstringautoVersion label for new deployments
descriptionstring(none)Description for the deployment or version
trigger-functionstring(none)Function name when creating a new trigger

Best Practices

  1. Version control your scripts locally - Keep Apps Script files in a Git repository alongside your other code. Use push and pull to synchronize between local and cloud versions.

  2. Test before deploying - Use the Apps Script test execution feature or local testing frameworks to validate your script before creating a production deployment.

  3. Use descriptive version labels - Version labels like "v2.1-invoice-pdf-fix" help you identify deployments months later when troubleshooting or rolling back changes.

  4. Review OAuth scopes in the manifest - The appsscript.json file declares which permissions your script requests. Review scopes carefully to follow the principle of least privilege.

  5. Monitor execution logs regularly - Scripts running on triggers can fail silently. Pull logs periodically to catch errors before users report issues.

Common Issues

  1. Push fails with permission error - Ensure you have editor access to the Apps Script project. The project owner may need to share it with your Google account.

  2. Deployment URL returns 403 - Web app deployments require explicit access configuration. Set the deployment to "Anyone" or "Anyone within domain" depending on your use case.

  3. Trigger quota exceeded - Google limits the number of triggers per user and per project. Delete unused triggers before creating new ones, or consolidate multiple trigger functions into a single dispatcher function that routes execution internally.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates