Website Ready
Code Ready
🔧This Webpage is Undergoing Maintenance🔧
GAS ...
GAS Changelog

GAS Project Creator

Setup tool for creating and configuring Google Apps Script projects

Setup & Configuration
  1. Google Account Setup
  2. Enable the Apps Script API at script.google.com/home/usersettings
  3. Create or use a GCP project where you have Owner access. If you don't have one, create a new project at console.cloud.google.com
  4. Enable the Apps Script API in your GCP project
    APIs & Services → Library → search "Apps Script API" → Enable
  5. New Apps Script Project
  6. Create a new Apps Script project via Google Sheets (recommended): open a new or existing Google Sheet → ExtensionsApps Script. This creates a script linked to that spreadsheet, which is needed for version-tracking features.
    Alternatively, for a standalone script (no spreadsheet link), create one at script.google.com
  7. GAS Project Settings
  8. In Project Settings, enable Show appsscript.json manifest file
    Project Settings → General settings → Show “appsscript.json” manifest file
  9. Link the GCP project in Apps Script
    Project Settings → Google Cloud Platform (GCP) Project → Change project
    Potential Troubleshooting: “You cannot switch to a Cloud Platform project in an Apps Script-managed folder”

    This error means your GCP project ended up inside Google’s hidden apps-script managed folder. Even projects you created manually can land there on Workspace accounts.

    How to diagnose

    1. Go to Manage Resources
    2. Look for: your org → system-gsuite → apps-script
    3. If your project is inside that folder, that’s the problem

    Fix — Option A: Move the project

    Requires the Project Mover IAM role — you likely don’t have it by default, even as org owner/admin.

    1. Go to IAM & Admin → use the top dropdown to select your organization (not a project)
    2. Click Grant Access → enter your own email
    3. Select role: Resource Manager → Project Mover → Save
    4. Go to Manage Resources → find your project in the apps-script folder
    5. Three-dot menu → Migrate → move to org root or “No organization”
    6. Retry changing the GCP project in Apps Script settings

    Fix — Option B: Create a new project

    1. Go to Google Cloud Console → create a new project
    2. Set Location to your org root or “No organization”
    3. Verify the project number does not start with sys-
    4. Enable the Apps Script API in the new project
    5. Use this project’s number in Apps Script settings
  10. Set Script Properties in your Apps Script project
    Project Settings → Script Properties → Add the following properties:
    GITHUB_TOKEN — your fine-grained personal access token
    Note: CACHE_EPOCH are auto-generated/distributed on first deploy — no manual setup needed.
    To create a token: GitHub.com → Settings → Developer settings → Fine-grained tokens → Generate new token. Under "Repository access" select Public repositories (read-only). No additional permissions are needed. Copy the github_pat_... value.
    Reuse across projects: The same token works for all your GAS projects — you don't need a new one per repo. Just paste the same token into each project's Script Properties. Note: GitHub only shows the token once at the time of creation and permanently hides it afterward — save it somewhere secure before closing the page.
  11. GAS Editor
  12. Set the appsscript.json manifest contents to:
    {
      "timeZone": "America/New_York",
      "runtimeVersion": "V8",
      "dependencies": {},
      "webapp": {
        "executeAs": "USER_DEPLOYING",
        "access": "ANYONE_ANONYMOUS"
      },
      "exceptionLogging": "STACKDRIVER",
      "oauthScopes": [
        "https://www.googleapis.com/auth/script.projects",
        "https://www.googleapis.com/auth/script.external_request",
        "https://www.googleapis.com/auth/script.deployments",
        "https://www.googleapis.com/auth/spreadsheets",
        "https://www.googleapis.com/auth/script.send_mail",
        "https://www.googleapis.com/auth/script.scriptapp"
      ]
    }
  13. Deploy #1 — Create the Web app deployment
    Deploy → New deployment → Select type: Web app → Execute as: Me → Who has access: Anyone
    Copy the Deployment ID (starts with AKfycb...). You’ll need it for the config below.
  14. Fill in your project values below (paste the Deployment ID from step 9) and copy the configured Code.gs
    Paste this code into your Apps Script project, replacing the existing code
    From Apps Script: Deploy → Manage deployments — required before using Test GAS Connection, Copy, or GAS Preview 💡 If the GAS preview shows “Script function not found: doGet”, the deployment ID is valid — proceed with entering your other fields, then copy Code.gs for GAS into the Apps Script editor
    Project Configuration
    Base name for all project files — e.g. test creates test.html, test.gs, html-versions/testhtml.version.txt, etc.
    Shown in browser tab and GAS UI
    Google Sheets ID for version tracking
    Tab name in the spreadsheet
    Google Drive file ID for notification sound
    Logo shown on the GAS splash screen
    Authentication Settings
    From Google Cloud Console → APIs & Services → Credentials → OAuth 2.0 Client ID (Web application type)
    Controls session duration, security features, and token exchange method. See 6-UNIFIED-TOGGLEABLE-AUTH-PATTERN.md for details
    Comma-separated list of allowed email domains. Leave blank to allow all Google accounts. Required for HIPAA preset
    Master ACL Spreadsheet (optional — centralized access control)
    A single spreadsheet that controls access to all GAS-powered pages. Row 1 = headers (Email, page1, page2, ...), rows 2+ = email + TRUE/FALSE per page. Leave blank to use the legacy editor/viewer sharing-list check on the data spreadsheet
    The sheet tab name in the master ACL spreadsheet where authorized emails are listed
    The column header in the ACL sheet that identifies this page. Defaults to the Environment Name if left blank
    In the Apps Script editor, replace all contents of Code.gs with the copied code
  15. Run any function from the Apps Script editor to trigger the initial OAuth authorization prompt
    This ensures the script has all required permissions before the final deployment
  16. Deploy #2 — Update the deployment with the new code
    Deploy → Manage deployments → Edit (pencil icon) → Version: New version → Deploy
    Why two deploys? Deploy #1 creates the deployment URL and gives you the Deployment ID. But the code you pasted in step 10 needs that ID to auto-update itself. Deploy #2 pushes the code (now containing the real Deployment ID) to the live deployment with all OAuth permissions granted. After this, all future updates are automatic — pushes to GitHub trigger the GAS to pull and redeploy itself.
  17. GAS Triggers
  18. (Optional) If using an installable trigger for sheet caching:
    Apps Script editor → Triggers → + Add Trigger → Function: onEditWriteB1ToCache, Event source: From spreadsheet, Event type: On edit