Acquiva
Automation

Getting Started with Google App Script: A Comprehensive Guide to Writing Your Own Apps

Google Apps Script (often written Google App Script) is JavaScript that runs inside Google's apps — Sheets, Docs, Forms, Gmail, and the rest of the Workspace suite. You write a function, attach a trigger (a form submission, a time of day, a spreadsheet edit), and Google runs it for you. No servers, no deployment pipeline — just a script editor inside your Sheet, Doc, or Form. Whether you're a business owner automating reporting or a marketer connecting forms to spreadsheets, App Script lowers the barrier to custom automation. This guide is the *tutorial* — what App Script is, how to start, a business workflow you can build today, and the clear limits of a script-in-your-account approach. For the managed, team-accessible automation platform, see our AI agents and business automation solution; for marketing-specific automation, see our marketing automation solution.

What Google Apps Script actually is

Apps Script is a cloud-based JavaScript platform. Your code lives in your Google account, runs on Google's servers, and has built-in access to the Workspace APIs — you can read a Sheet, send a Gmail, create a Doc, or post to a Calendar without authenticating separately, because the script already runs as you. The trade-off: the script lives in your account, it's hard to share and audit, and there's no dashboard for non-technical team members. It's a powerful starting point, not a long-term home for business-critical workflows.

Your first script: the script editor

  1. Open a Google Sheet (or Form, Doc) and click Extensions → Apps Script.
  2. The script editor opens in a new tab with a blank function.
  3. Write your function in plain JavaScript — Apps Script supports modern ES6 syntax.
  4. Save, then click Run to execute it once; use the clock icon (Triggers) to schedule it.
  5. Authorize the scopes Google requests the first time you run — the script runs under your account.

The core idea is simple: you write a function, attach a trigger, and Google runs it for you. A trigger can be time-driven (every hour, every day), event-driven (on form submit, on spreadsheet edit), or manual. Most business automation starts with a time-driven trigger or a form-submit trigger.

A business workflow: form to team notification

A common first project — and a practical one — is connecting a Google Form to a team notification. When a prospect fills out a form on your site, you want your team to know immediately. Here's the pattern:

  1. Create a Google Form for lead capture; responses land in a linked Sheet.
  2. Open the Sheet → Extensions → Apps Script.
  3. Write a function that reads the latest form response and sends an email.
  4. Attach an 'on form submit' trigger so the function runs automatically on each new response.

A minimal version of the function, using Apps Script's built-in Gmail and Spreadsheet services:

Worked example

Form-submit notification (illustrative code)

function notifyOnFormSubmit(e) { // e.values is an array matching your form fields, in order const name = e.values[1]; const email = e.values[2]; const message = e.values[3]; MailApp.sendEmail({ to: 'team@yourbusiness.com', subject: 'New lead: ' + name, body: name + ' (' + email + ') submitted a form: ' + message }); } // Then: Triggers → Add trigger → notifyOnFormSubmit, // event source: From spreadsheet, 'On form submit'. // This runs automatically on each new form response. No servers, no deploy.

From there, App Script can call external APIs, schedule daily summaries, and generate documents automatically. A practical next step: use a time-driven trigger to pull data from one Sheet, transform it, and write a summary to another — the building block of automated reporting. Once it's running, it runs reliably and for free.

The clear limits of a script in your account

When your scripts become business-critical, the limitations show. Scripts live in your personal account, which makes them hard to share, audit, or hand off. There's no permissions model for a non-technical teammate. There's no dashboard, no logging your team can read, no error alerts beyond an email to you. And when a script touches customer data, it runs as your account — with your full access — which is more privilege than the task needs. These limits are the reason most service businesses move a workflow into a managed platform once it becomes routine: the same automation runs with logging, role-based permissions, and a UI your team can actually use.

If you're deciding what to automate first, look for the repetitive, rules-based tasks that someone does the same way every time — those are the candidates. When automation becomes business-critical, moving it into a managed platform is often the next step. Our AI agents and business automation solution covers that managed capability; our marketing automation solution covers the marketing-specific layer.