Google Apps Script: Automating Google Workspace

Google Apps Script automates Workspace on Google's servers. Its daily quotas and six-minute limit, who a trigger runs as, and calls out to Xero or Shopify.

Google Apps Script is Google’s platform for automating Google Workspace. Scripts are written in JavaScript and run on Google’s own servers, so there’s nothing to install or host. In June 2026, Google made it a Workspace core service, covered by the Google Cloud terms and standard support.

It reaches most of what a team uses every day. Built-in services cover Gmail, Calendar, Drive, Docs, Sheets, Slides, Forms, Tasks and Contacts. Advanced services open up Google’s wider APIs, from the Admin console and BigQuery to YouTube and Vertex AI.

Calling Xero, Shopify and other APIs

Scripts aren’t limited to Google. UrlFetchApp calls any other system’s API, and the JDBC service connects straight to MySQL, Microsoft SQL Server, Oracle and PostgreSQL databases. Since July 2024, Workspace admins can allowlist the outside addresses scripts are permitted to call.

Xero signs apps in with OAuth, where someone approves access once and the tokens are refreshed from then on. Google’s open-source OAuth2 library for Apps Script creates and refreshes those tokens, and its samples include Xero and QuickBooks.

Shopify has treated its REST Admin API as legacy since October 2024, and some newer features exist only in the GraphQL Admin API. Orders can also come to the script: a web app accepts Shopify’s webhooks, but the event object it hands the script holds the body and parameters without the request headers. Shopify puts its signature, the proof that an order really came from Shopify, in a header. A timed script that asks Shopify for orders since its last run, and writes each line item to a sheet, sidesteps that gap.

Where scripts live

A script can be bound to a single Sheet, Doc, Slides file or Form, or stand alone in Drive. Shared code goes into libraries that other scripts reuse.

From there it can be deployed as a web app that receives data or as an API executable that other systems call. It can also become one of the Workspace add-ons, which appear inside Gmail, Calendar, Drive, Chat and the editors, and can be published privately so only your own organization sees them.

Who a trigger runs as

Installable triggers start a script from an event, like an edit or a form response, or on a timer from every minute to once a month. Each one always runs under the account of the person who created it. A colleague who edits the sheet can set it off, but any email it sends still comes from the creator. Other accounts can’t see a trigger someone else installed, so a timed order import lives on one person’s Google account, out of everyone else’s view.

When a triggered run fails, nothing appears on anyone’s screen. Apps Script sends a “Summary of failures” email instead, with links to fix the script or switch the trigger off.

The six-minute run limit

A single run can last up to six minutes, and custom functions inside a cell get 30 seconds. Past the limit, the script throws an exception and stops partway through. A longer job, like copying a year of Shopify orders, runs in batches: each run records where it stopped in the Properties service, a small key-value store, and the next timed run carries on from there.

Daily quotas are counted per user and reset 24 hours after the first request. They’re higher on Workspace than on a personal Google account: a Workspace script can email 1,500 recipients a day against 100, and make 100,000 calls to outside services against 20,000. Triggered scripts can run for 6 hours a day in total on Workspace, against 90 minutes.

Tools for building

The online editor is where most scripts start, and since August 2026 a Gemini side panel in beta can write and debug code from a plain request. For larger projects, Google’s open-source clasp tool lets developers work locally and keep scripts in Git.

Every run is recorded, and linking a script to a Google Cloud project adds Cloud Logging, which keeps logs for much longer. Since September 2026, Enterprise Plus customers can also keep script data in a chosen data region.

When a script becomes the system

Apps Script can reach almost anything in Workspace and, through UrlFetchApp, most systems outside it. A sheet can pull yesterday’s orders from Shopify on a timer, a form response can create the customer in Xero, and a Gmail label can file invoice attachments into Drive, all with no server to run.

Scripts like these often start as one person’s quick fix and end up running part of the business on that person’s account, which is why someone needs to own them after launch. Before a script grows into something bigger, put a number on the hours it saves, and if Gemini or Vertex AI is the next step, the data underneath comes first.

Ready
to GLUE?

Got a bottleneck slowing you down? Get in touch to discuss your pain points and how we can streamline your workflow