What is Google Apps Script?
Google Apps Script is a scripting language for working with and automating Google’s services.
It’s based on JavaScript.
It’s especially often used together with Google Sheets, Google’s spreadsheet service.
Types of Google Apps Script
Section titled “Types of Google Apps Script”There are two types: standalone scripts, which you create as separate files in Google Drive, and container-bound scripts, which are bound to a Google Sheets, Docs, Slides, or Forms file.
Although they’re different types, the main difference is where they’re stored, and the way you write them is largely the same. However, there are some differences. For example, a container-bound script can’t be separated from the file it’s bound to, and it can get that file directly with methods such as SpreadsheetApp.getActiveSpreadsheet().
Coding conventions on this site
Section titled “Coding conventions on this site”The JavaScript standard (ECMAScript) is updated every year, and with the introduction of the V8 runtime, Google Apps Script now supports modern syntax such as let / const, arrow functions, classes, and template literals. Note that ES modules (import / export) aren’t supported.
For example, many sites that introduce Google Apps Script still use var to define variables, but this style tends to cause bugs and isn’t really recommended today.
With the current runtime, you can define variables with var, let, or const, and you can handle every variable definition with just let and const.
On this site, we write our samples using the newest syntax wherever possible.
External links
Section titled “External links”All articles
11 articlesControll spreadsheet
- Get the locale (regional settings)
Explains how to get the locale (regional settings) of a specific spreadsheet.
- Get the theme
Explains how to get the theme applied to a specific spreadsheet.
- Get the time zone
Explains how to get the time zone of a specific spreadsheet.
Controll Google Calendar
- Get a calendar
Google Apps Script has a built-in CalendarApp class for working with Google Calendar. This article explains how to use the CalendarApp class to get a CalendarApp.Calendar object, the starting point for many other operations.
- Add a calendar
Google Apps Script has a built-in CalendarApp class for working with Google Calendar. This article shows how to use the CalendarApp class to create a new calendar and add it to your account.
- Delete a calendar
Google Apps Script has a built-in CalendarApp class for working with Google Calendar. This article explains how to use the CalendarApp class to delete a specific calendar from an account.
- Add an event
Google Apps Script has a built-in CalendarApp class for working with Google Calendar. This article explains how to use the CalendarApp class to add an event to a calendar.
Topics
- Get owner information
Explains the method to use when you want to get the owner of a specific spreadsheet.
- Manage protected ranges and sheets
Explains the method for getting protected ranges and sheets from a specific spreadsheet.
- Get values from a range
Explains how to get the values of a specific range from a spreadsheet.
- Get the number of sheets
Explains the method to use when you want to get the number of sheets in a specific spreadsheet.
No matching articles.
{visible} of {total}