Google Apps Script is a free Google platform that lets you automate Google Sheets, Gmail, Calendar, Docs, Forms and Drive with short pieces of JavaScript. You write the script in your browser, it is saved to Google Drive and runs on Google's servers – nothing to install and no server of your own. It is a good fit for repetitive work around spreadsheets and email: summaries, alerts, copying form responses or generating documents.
In short:
- Price: Apps Script is available with a regular Google account (gmail.com) and in Google Workspace; only the daily quotas differ.
- What it does: reads and writes spreadsheets, sends email, creates calendar events, builds documents and calls external APIs.
- Runs on its own: time-driven triggers (from every minute to once a month) and events such as a form submission or a spreadsheet edit.
- Limits: a single execution may run for up to 6 minutes; triggers have a daily cap of 90 minutes (gmail.com) or 6 hours (Workspace).
- When to use something else: to connect many apps outside Google, Make, Zapier or n8n is usually more practical.
What is Google Apps Script
Google describes Apps Script (often shortened to GAS) as a rapid application development platform for business applications that integrate with Google Workspace. You write modern JavaScript and get built-in libraries for each service: SpreadsheetApp for Sheets, MailApp and GmailApp for email, CalendarApp for Calendar, DocumentApp for Docs, DriveApp for Drive and UrlFetchApp for calling external APIs.
A script can be bound to a specific file (a spreadsheet, document or form) – you open it from that file's menu, and it can add custom menus or dialogs to the file or react when it is opened. Or it can be standalone and work with several files at once. For most business automations built around one spreadsheet, a bound script is enough.
Apps Script also goes beyond background automation: custom functions you can use in cells (for example =CONVERT_PRICE(A1)), macros in Sheets, simple web apps and add-ons for the Google Workspace Marketplace.
What you can automate with Google Apps Script
The biggest time savings come from tasks someone does by hand every day or week, following the same steps. Typical examples in small and mid-sized businesses:
| Task | Apps Script services | What starts the script |
|---|---|---|
| Confirmation email after an enquiry form is submitted | FormApp, MailApp | form submission |
| Daily or weekly spreadsheet summary by email | SpreadsheetApp, MailApp | time-driven trigger |
| Copying dates from a spreadsheet into Google Calendar | SpreadsheetApp, CalendarApp | spreadsheet edit or time-driven trigger |
| Quote or contract from a Docs template, saved as PDF | DocumentApp, DriveApp | custom menu in the spreadsheet |
| Pulling data from an external system (rates, orders, stock) | UrlFetchApp, SpreadsheetApp | time-driven trigger |
| Checking a spreadsheet for duplicates or missing data | SpreadsheetApp | opening the file or a custom menu |
This turns a spreadsheet into a simple workflow without extra software. UrlFetchApp can also call AI models – how connecting to language models works is covered in our OpenAI API guide.
How to write your first Google Apps Script step by step
The steps below create a script that emails a summary of new orders from a spreadsheet once a day. This is a model example – an ‘Orders’ sheet with the order number in column A, the customer in B, the amount in D and the status in E.
- 1Open the spreadsheet in Google Sheets and choose Extensions > Apps Script. The editor opens with a Code.gs file.
- 2Delete the empty placeholder function and paste the code below. Adjust the sheet name, column numbers and email address.
- 3Save the project (disk icon or Ctrl+S) and give it a name, such as ‘Order summary’.
- 4Select the sendOrderSummary function at the top and click Run. On the first run Google asks for authorisation – the script wants to read the spreadsheet and send email on your behalf.
- 5Check the execution log at the bottom of the editor. If the script failed, it shows the line where it stopped.
- 6In the left panel open Triggers (the alarm clock icon), click Add trigger, choose the function, a time-driven event source and a daily interval, for example 7–8 am.
// Model example: daily email summary of new orders
function sendOrderSummary() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Orders');
const rows = sheet.getDataRange().getValues(); // read the whole table in one call
const newOrders = rows.slice(1).filter(r => r[4] === 'new'); // column E = status
if (newOrders.length === 0) return; // nothing new, no email
const text = newOrders.map(r => r[0] + ' | ' + r[1] + ' | €' + r[3]).join('\n');
MailApp.sendEmail('sales@example.com', 'New orders: ' + newOrders.length, text);
}Note that the script reads the whole table with a single getValues() call and then works with the data in memory. Reading cell by cell is far slower and on larger sheets will hit the six-minute limit.
If you would rather not start with code, record a macro first: Extensions > Macros > Record macro, perform the steps in the sheet and save. Google stores the macro as an Apps Script function, so you can open the code and edit it.
Triggers: how a script runs on its own
A trigger decides when a function runs without you clicking anything. Apps Script has two kinds:
- Simple triggers are functions with reserved names, such as onOpen() when a file opens or onEdit() when a cell changes. They need no setup, but they run for at most 30 seconds, only work in a script bound to a file and cannot use services that require authorisation – so they cannot send email.
- Installable triggers are set up in the editor or in code. There are time-driven, open, edit, change, form submit and calendar event triggers. They can use services that require authorisation.
Two things about installable triggers are worth knowing up front. They always run under the account of the person who created them – if that person leaves and their account is deleted, the automation stops. And Google randomises the start time slightly: a daily trigger set for 9:00 runs between 9 and 10 am. When a trigger fails, Apps Script emails the owner a summary of the errors.
Triggers do not fire on changes made by another script or through an API. If an external system fills the spreadsheet, onEdit() will not run – use a time-driven trigger that checks for new rows instead.
Google Apps Script quotas and limits
Apps Script is free, but it has daily per-user quotas. They reset 24 hours after the first request, and Google may change them at any time. The key values from Google's documentation (as of November 2026):
| Limit | gmail.com account | Google Workspace |
|---|---|---|
| Script runtime per execution | 6 min | 6 min |
| Total trigger runtime per day | 90 min | 6 h |
| Email recipients per day (MailApp) | 100 | 1,500 |
| UrlFetch calls per day | 20,000 | 100,000 |
| Calendar events created per day | 5,000 | 10,000 |
| Triggers per user per script | 20 | 20 |
Three practical takeaways for a business. Do not use Apps Script for bulk mailings – that is what email marketing with a proper sending tool is for. Process large data sets in batches. And run business automations from a Google Workspace account, not a personal gmail.com: the limits are higher and the account does not disappear when one person leaves.
Google Apps Script or Make, Zapier and n8n?
Apps Script and tools such as Make or Zapier are not mutually exclusive. What matters is where the data lives and who will maintain the automation.
| Google Apps Script | Make, Zapier, n8n | |
|---|---|---|
| Price | free within quotas | free tier with limits, then a monthly subscription |
| How you build | JavaScript code | visual editor |
| Strongest in | Sheets, Gmail, Calendar and Drive | connecting hundreds to thousands of apps |
| External apps | through their APIs, all by hand | ready-made connectors |
| Maintenance | needs someone who understands code | a non-developer can make changes |
Choose Apps Script when the automation revolves around a spreadsheet and Google services and you have someone who can maintain the code. Make, Zapier or n8n are better for connecting a CRM, online shop, invoicing and other systems – see our n8n vs Zapier vs Make comparison. They are often combined: a spreadsheet with Apps Script prepares the data and Make passes it on.
Common mistakes when automating with Apps Script
- API keys and passwords in the code. Anyone with access to the spreadsheet can often see the script too. Store secrets in script properties (PropertiesService).
- A trigger owned by one employee. Create it from a shared company account and note who looks after it.
- Reading and writing cell by cell. Use getValues() and setValues() for whole ranges, or the script will hit the 6-minute limit.
- No error handling. Without try/catch and checks for empty rows, the script fails on the first unexpected value. Do not leave trigger failure emails unread for a month.
- Undocumented automations. A year later nobody knows which script sends which emails. A simple list is enough: what the script does, where it runs, who owns it.
When to hand automation to a specialist
A simple summary or confirmation email is within reach of a capable spreadsheet user following the guide above. But once orders, invoicing or customer communication depend on a script, you need error handling, backups and someone who maintains it. The same applies when a spreadsheet has grown into the role of a CRM system and Apps Script is just holding it together.
At Weboptim we first map what repeats in your business and then choose the simplest tool – sometimes Apps Script, sometimes Make, Airtable or a direct API integration. If you would like us to review your processes, see our digitalisation and automation service.
Frequently asked questions
What is Google Apps Script?
Is Google Apps Script free?
Do I need to know how to code to use Apps Script?
How often can a script run automatically?
What is the difference between a macro and Apps Script?
Sources

Written by
Peter GáboríkProject Manager – AI, Automation & SEO
Project manager and founder of Weboptim. Builds growth strategies around SEO, automation and AI; in online marketing since 2017.
Related service
Tips that save time – once a month
One e-mail a month: a new guide, the automation of the month and one number from practice. No spam.



