Quick Gws Apps Script
Streamline your workflow with this google, apps, script, upload. Includes structured workflows, validation checks, and reusable patterns for google workspace.
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
| Aspect | Details |
|---|---|
| File Sync | Push and pull .gs and .html files between local filesystem and Apps Script |
| Deployments | Create versioned deployments for web apps, add-ons, or API executables |
| Triggers | Manage time-driven, event-driven, and installable triggers remotely |
| Logging | Retrieve execution logs and error reports from the Stackdriver integration |
| Manifests | Manage 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
| Parameter | Type | Default | Description |
|---|---|---|---|
| action | string | (required) | Action: push, pull, deploy, logs, triggers |
| project-id | string | (required) | Apps Script project ID from the script URL |
| version | string | auto | Version label for new deployments |
| description | string | (none) | Description for the deployment or version |
| trigger-function | string | (none) | Function name when creating a new trigger |
Best Practices
-
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.
-
Test before deploying - Use the Apps Script test execution feature or local testing frameworks to validate your script before creating a production deployment.
-
Use descriptive version labels - Version labels like "v2.1-invoice-pdf-fix" help you identify deployments months later when troubleshooting or rolling back changes.
-
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.
-
Monitor execution logs regularly - Scripts running on triggers can fail silently. Pull logs periodically to catch errors before users report issues.
Common Issues
-
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.
-
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.
-
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.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Git Commit Message Generator
Generates well-structured conventional commit messages by analyzing staged changes. Follows Conventional Commits spec with scope detection.
React Component Scaffolder
Scaffolds a complete React component with TypeScript types, Tailwind styles, Storybook stories, and unit tests. Follows project conventions automatically.
CI/CD Pipeline Generator
Generates GitHub Actions workflows for CI/CD including linting, testing, building, and deploying. Detects project stack automatically.