Google Apps Script

Google Apps Script Web App Deployment Checklist: What to Verify Before You Publish

A step‑by‑step checklist for small‑business owners to verify ownership, permissions, triggers and testing before publishing a Google Apps Script web app.

Before you click Deploy on a Google Apps Script web app, make sure you have verified three critical things: who owns the project and its data, which permissions the script needs, and how you will test the live URL. Skipping any of these steps can lead to broken automations, data loss, or a denied deployment.

1. Confirm Project Ownership and Data Access

Ownership determines who can edit the script, change deployment settings, and view the execution logs. Follow these sub‑steps:

  1. Check the Google account used to create the script. Open the script editor ( script.google.com ) and look at the top‑right avatar. The email shown is the owner.
  2. Verify spreadsheet ownership. If your script reads or writes a Google Sheet, open that Sheet and select File → Share → Owner. The owner should be the same account or a trusted collaborator.
  3. Document data sources. List every external file, Drive folder, or API that the script touches. Note who owns each resource and whether the owner has granted the necessary OAuth scopes.

If any resource is owned by a different user, ask that user to add the script owner as an editor or to transfer ownership. This avoids “Access denied” errors after deployment.

2. Set Up Permissions and Triggers Correctly

Google Apps Script runs under the identity of the user who authorizes it. Choose the right execution mode before publishing:

  • Execute as me (owner) – suitable for back‑office tools where the script needs to modify data the owner can access.
  • Execute as user accessing the web app – required when each visitor should only see their own data.

Next, configure triggers:

  1. Open Edit → Current project's triggers.
  2. Add any time‑driven triggers (e.g., daily sync) before deploying. Triggers created after deployment may run under a different version.
  3. For web‑app specific actions, rely on doGet(e) and doPost(e) handlers rather than installable triggers.

Finally, review the required scopes in appsscript.json. Remove any scopes you don’t need – fewer scopes mean a smoother authorization flow for end users.

3. Deploy the Web App Safely

When you are confident about ownership and permissions, follow this deployment workflow:

  1. Create a version. In the script editor, click File → Manage versions…, give it a descriptive name (e.g., “v1.0‑inventory‑dashboard”), and save.
  2. Deploy as a web app. Choose Deploy → New deployment, select Web app, and set:
    • Execute the app as: Owner or User, based on your earlier decision.
    • Who has access: Only myself, Anyone with the link, or Anyone (public). For internal tools, “Anyone with the link” is safest.
  3. Copy the deployment URL. Test it in an incognito window to confirm the authorization prompt matches your expectations.
  4. Check logs. Open View → Logs or use console.log() statements in your code. The Execution transcript helps spot runtime errors.
  5. Set up error notifications. Add a simple try { … } catch (e) { MailApp.sendEmail([email protected], 'Script error', e.message); } block to receive email alerts if the live app fails.

Remember that each new change requires a new version and a redeployment. Keep old versions for rollback – you can revert to a previous version from the deployment manager.

Realistic Example: Inventory Dashboard for a Small Retailer

Ahmed runs a modest online store in Pakistan and wants a quick dashboard that shows daily sales, low‑stock alerts, and a button to reorder items. He stores sales data in a Google Sheet called SalesLog and product quantities in Inventory.

  1. He creates a new Apps Script project bound to the Inventory sheet.
  2. He writes a doGet(e) function that returns an HTML page with a table built from the sheet data.
  3. He adds a reorderLowStock() function that sends a pre‑filled email to his supplier. This function requires the https://www.googleapis.com/auth/gmail.send scope.
  4. He verifies that his Gmail account (owner) can send the email and that the Inventory sheet is shared with the same owner.
  5. He creates version “v1.0‑dashboard” and deploys the web app with “Execute as me (owner)” and “Anyone with the link”.
  6. Testing in a private browser shows the table loads, the reorder button triggers the email, and the logs contain no errors.

If Ahmed later wants his sales team to view the dashboard without the reorder button, he can create a second deployment that executes as “User accessing the web app” and shares the URL only with the team.

Common Mistakes and How to Fix Them

  • Deploying before creating a version. The web app will run the latest unsaved code, which can change unexpectedly. Fix: Always save a version first.
  • Using the wrong execution mode. Owner‑only mode can expose confidential data to anyone with the link. Fix: Match the mode to the data visibility requirement.
  • Missing scopes. Users see a “Permission denied” dialog when the script tries to access an API it didn’t request. Fix: Review appsscript.json and add any needed scopes.
  • Forgetting to share the underlying spreadsheet. The script runs but can’t read/write data, resulting in empty tables. Fix: Share the sheet with the script owner or set the owner as editor.
  • Relying on installable triggers after deployment. Triggers created under a previous version won’t fire for the new version. Fix: Re‑create time‑driven triggers after each new version.

Deployment Checklist

  1. Owner account verified for script and all Google Sheets used.
  2. All required OAuth scopes listed in appsscript.json.
  3. Time‑driven or other installable triggers created before versioning.
  4. Version saved with a clear name.
  5. Web app deployment settings:
    • Execute as: Owner or User (as needed).
    • Access: Only myself / Anyone with link / Public.
  6. Test URL in a private/incognito window.
    • Confirm authorization prompts match expected scopes.
    • Check that data loads correctly.
  7. Review execution logs for errors.
    • Set up email alerts for uncaught exceptions.
  8. Document the deployment URL, version number, and owner contact.
    • Store this information in a shared Google Doc for future reference.

Next Steps

Once your web app passes the checklist, you can share the link with teammates, embed it in a Google Site, or integrate it with a simple front‑end. If you need a ready‑made e‑commerce workflow, view the Apps Script ecommerce source‑code package. For custom requirements or deployment help, contact us and we’ll walk you through the process.

By confirming ownership, tightening permissions, and testing thoroughly, you reduce the risk of surprise errors and keep your automation reliable as your business grows.