Send feedback
Script Service
Stay organized with collections
Save and categorize content based on your preferences.
Script
This service provides access to script triggers and script publishing.
Classes
Name Brief description
AuthMode
An enumeration that identifies which categories of authorized services Apps Script is able to
execute through a triggered function.
AuthorizationInfo
An object used to determine whether the user needs to authorize this script to use one or more
services, and to provide the URL for an authorization dialog.
AuthorizationStatus
An enumeration denoting the authorization status of a script.
CalendarTriggerBuilder
Builder for calendar triggers.
ClockTriggerBuilder
A builder for clock triggers.
DocumentTriggerBuilder
A builder for document triggers.
EventType
An enumeration denoting the type of triggered event.
FormTriggerBuilder
A builder for form triggers.
InstallationSource
An enumeration that indicates how the script came to be installed as an add-on for the current
user.
ScriptApp
Access and manipulate script publishing and triggers.
Service
Access and manipulate script publishing.
SpreadsheetTriggerBuilder
Builder for spreadsheet triggers.
StateTokenBuilder
Allows scripts to create state tokens that can be used in callback APIs (like OAuth flows).
Trigger
A script trigger.
TriggerBuilder
A generic builder for script triggers.
TriggerSource
An enumeration denoting the source of the event that causes the trigger to fire.
Properties
Property Type Description
NONE
Enum
A mode that does not allow access to any services that require authorization.
CUSTOM_FUNCTION
Enum
A mode that allows access to a limited subset of services for use in custom spreadsheet
functions.
LIMITED
Enum
A mode that allows access to a limited subset of services.
FULL
Enum
A mode that allows access to all services that require authorization.
Methods
Method Return type Brief description
getAuthorizationStatus()
AuthorizationStatus
Gets a value that indicates whether the user needs to authorize this script to use one or more
services (for example, ScriptApp.AuthorizationStatus.REQUIRED
).
getAuthorizationUrl()
String
Gets the authorization URL that can be used to grant access to the script.
Properties
Property Type Description
REQUIRED
Enum
The user needs to authorize this script to use one or more services.
NOT_REQUIRED
Enum
The user has granted this script all the authorization it currently requires.
Properties
Property Type Description
CLOCK
Enum
The trigger fires once the time-driven event reaches a specific time.
ON_OPEN
Enum
The trigger fires once the user opens the Google Docs, Sheets, or Forms file.
ON_EDIT
Enum
The trigger fires once the user edits the Google Sheets file (for example, by entering a new
value into a cell, which counts as an edit instead of a change).
ON_FORM_SUBMIT
Enum
The trigger fires once the user responds to a Google Form.
ON_CHANGE
Enum
The trigger fires once the user changes the Google Sheets file (for example, by adding a row,
which counts as a change instead of an edit).
ON_EVENT_UPDATED
Enum
The trigger fires once an event gets created, updated, or deleted on the specified Google
Calendar.
Properties
Property Type Description
APPS_MARKETPLACE_DOMAIN_ADD_ON
Enum
Add-on was installed by the administrator for the user's domain.
NONE
Enum
Script is not running as an add-on.
WEB_STORE_ADD_ON
Enum
Add-on was installed by the user from the Chrome Web Store.
Properties
Property Type Description
AuthMode
AuthMode
An enumeration that identifies which categories of authorized services Apps Script is able to
execute through a triggered function.
AuthorizationStatus
AuthorizationStatus
An enumeration denoting the authorization status of a script.
EventType
EventType
An enumeration denoting the type of triggered event.
InstallationSource
InstallationSource
An enumeration denoting how the script was installed to the user as an add-on.
TriggerSource
TriggerSource
An enumeration denoting the source of the event that causes the trigger to fire.
WeekDay
Weekday
An enumeration representing the days of the week.
Methods
Method Return type Brief description
getUrl()
String
Returns the URL of the web app, if it has been deployed; otherwise returns null
.
isEnabled()
Boolean
Returns true
if the script is accessible as a web app.
Properties
Property Type Description
SPREADSHEETS
Enum
Google Sheets causes the trigger to fire.
CLOCK
Enum
A time-driven event causes the trigger to fire.
FORMS
Enum
Google Forms causes the trigger to fire.
DOCUMENTS
Enum
Google Docs causes the trigger to fire.
CALENDAR
Enum
Google Calendar causes the trigger to fire.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-02-24 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2022-02-24 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-02-24 UTC."]]