Skip to content
Skip to chapter

Chapter 38

Reference and glossary

Reference, glossary, and troubleshooting

Find the right Apps Script term, service reference, example, or troubleshooting guide when maintaining a production script.

By the end

Locate a precise source for a service, execution surface, error, or example instead of relying on a copied fragment.

Chapter navigation

Use this appendix to look up Apps Script terms, common errors, book examples, and reference documentation. Google's official documentation is the authority for current APIs, quotas, deployment settings, and product policies.

Glossary

TermMeaningWhere to go next
Access tokenA short-lived bearer credential sent to a resource API. Local token presence does not prove that the provider still accepts it.Access and refresh lifetimes
Advanced serviceAn Apps Script service that exposes a Google API. Enable it in Apps Script. If the script uses a standard Cloud project, also enable the Google API in that Cloud project.Advanced services
Argument and parameterAn argument is a value supplied by a call; a parameter is the local name receiving that value inside the function.Functions and calls
ArrayAn ordered collection accessed by zero-based indexes. A range's getValues() result is an array of row arrays, not a live connection to the cells.JavaScript arrays
AuthenticationEstablishing the identity of a caller. It is separate from deciding what that caller may do.Consent and remote authentication
AuthorizationDeciding which operations an identity may perform. OAuth scopes do not replace provider roles, resource permissions, or organization policy.Separate grants and resource access
Bound scriptA project attached to one Sheets, Docs, Slides, or Forms file.Bound versus standalone scripts
CacheDisposable stored data that can be recomputed. A requested expiration does not guarantee that the value remains available until then.Rebuild a cached summary
CallbackA function passed to another function to be called as part of its work. An array callback runs in the current execution; it is not a trigger or a new execution.Array transformations
Chart builderA changeable description used to construct a chart. build() produces an object; inserting or updating that object is a separate Sheets operation.Building versus saving a chart
CheckpointPersisted progress used to decide what work to inspect or attempt next. A checkpoint does not make a separate service action transactional or exactly-once.Local plans and external checkpoints
CoercionAutomatic conversion between value types. Strict comparison avoids some implicit conversions, while explicit conversion still needs validation.Values and objects
Content-TypeResponse metadata describing the body's format. It differs from an Accept request preference; valid JSON still needs shape and value checks.Check responses in stages
Custom functionA spreadsheet formula function written in Apps Script that returns a value to a cell without changing other cells or using authorized services.Custom functions
Data validationRules that restrict what a user can enter into a spreadsheet cell. Script-written validation can preserve or replace manual rules.Sheets validation and formatting
DeploymentA released configuration of a script, such as a web app or add-on.Deployments
DiagnosticA code checker warning or error that identifies mistakes before or during script execution.Find mistakes with diagnostics
EndpointThe API address and operation a client intends to call. Its provider defines input, identity, response and delivery contracts.Describe an HTTP request
ExecutionOne invocation of script code, with its own local variables, identity and limits. A later execution does not recover an earlier local variable automatically.State across runs
Execution identityThe user whose authority applies to one execution. It depends on the surface, such as editor, trigger, or web app.Authorization guide
Form-submit eventThe event supplied to an installed submission handler. A Forms event contains a FormResponse; a linked-Sheets event has a different shape.Actual Forms events
HMACA message-authentication code computed from agreed bytes and a shared key. It authenticates those bytes but does not encrypt the body.Authenticated event fields
Installable triggerA trigger created by a user that runs under that creator's account.Safe triggers
InstantA point on the timeline represented by a JavaScript Date. Display time zones change its representation, not the stored instant; an all-day calendar date has a different meaning.Calendar dates and instants
JSONA text format for data. Parsing reconstructs a value; it does not prove the value's expected fields, types or business meaning.Response parsing and validation
LibraryAnother Apps Script project included by Script ID and version number. The consumer project must have read access to the library script.Producer and consumer projects
LockCoordination among participating executions within a defined scope. Acquire it before reading the state used for an update; it does not lock other services or human edits.Protect read-modify-write
Manifestappsscript.json, the project configuration file for runtime settings and explicit scopes.Manifests
Nullish valuenull or undefined. Zero, false and an empty string are not nullish; using truthiness as a defaulting rule can discard those meaningful values.Values and missing data
Object and propertyAn object groups named values. A property is one of those named entries; changing a shared object's property can be visible through another reference to the same object.Values and objects
OAuth callback URIThe registered address to which the provider returns the browser after authorization. The OAuth2 library's Apps Script /usercallback URI is not a web-app /exec URL.Register the exact callback
OAuth grantProvider authorization for a client to act with specified permissions. It is separate from Apps Script's own consent and does not share a file with the authorizing account.Two authorizations
OAuth scopeA named permission, such as access to spreadsheets or external requests.Authorization scopes
PaginationReading portions of a larger result through the provider's page contract. Reaching a local page or item limit does not establish that every record was read.Bounded public pagination
Properties serviceString-valued persistence scoped to a script, executing user or eligible document context. Reading a property does not create a live, automatically saved object.Choose a property store
Pure helperA function whose return value depends only on its parameters and that performs no service calls or state mutations.Functions and decisions
QuotaA limit on a service or account use, often measured over time.Current quotas
RangeA selected rectangle of spreadsheet cells. Its two-dimensional values must match the dimensions supplied to setValues().Batched Sheets work
ReconciliationChecking recorded state and target resources after an interrupted write to determine whether the operation succeeded before retrying.Calendar create recovery
Refresh tokenA longer-lived credential used to request another access token without a new consent round trip. It can expire or be revoked; a saved value is not a permanent connection.Observe actual refresh behavior
Schema and revisionA schema defines data shape and invariants. A format version identifies how to interpret stored data; a revision identifies a state update within that format.Versioned state records
Scope, lexicalThe region of code where a variable name is available. It is unrelated to an OAuth scope or a Properties sharing scope.Functions and scope
Script IDThe identifier of an Apps Script project, shown in Project Settings.clasp guide
Simple triggerA reserved function such as onOpen that runs under simple-trigger restrictions.Triggers explained
Smoke testA fast integration test run against real services or a staging tab to verify that basic operations succeed before production use.Test Apps Script code
Standalone scriptA project not attached to a container file.Bound versus standalone scripts
Strict comparison=== and !== compare without first converting one operand to the other's type. Object equality compares identity, not matching fields.Values and comparison
Structured outputModel responses constrained to a strict JSON schema so that values can be parsed and validated reliably by script code.Use AI models from Apps Script
TriggerAn event-driven execution, such as opening a file or a schedule.Triggers guide
UrlFetchAppThe Apps Script service for HTTP and HTTPS requests.HTTP response reference
VersionA numbered, immutable snapshot of Apps Script project source. Saved Head, a deployment, and the version selected by a library consumer are different things.Numbered library releases
Web appA deployed doGet or doPost endpoint that returns HTML or text.Web apps
WebhookAn event delivered by HTTP POST to a receiver endpoint whose authentication, status-code, and retry behavior must match the sender's contract.Choose a supported delivery contract
iCalUIDThe CalendarApp event identifier returned by CalendarEvent.getId(). It is not interchangeable with Calendar REST event.id; retain the calendar context as well.Stored Calendar identities

Troubleshooting index

Start with the exact error, execution type, and time. The Apps Script dashboard can show project executions and health data, but its visibility depends on your access to the project.

SymptomFirst checkLikely next action
Authorization is requiredThe execution identity and the current manifest scopes.Run the authorized setup flow as the relevant user. A background trigger cannot prompt for a missing permission.
Cannot call ... of null or a missing sheet errorThe file, sheet name, and selected range used by the code.Stop with a descriptive check before reading or writing. See common errors.
Service invoked too many times or a limit errorThe current quota page and how often the code calls the service.Batch operations, reduce frequency, and checkpoint work. Do not guess a wait period from an old blog post.
A menu does not appearThat the project is bound to the file, saved, and has an exact onOpen function.Reload the file. See custom menus.
A trigger worked for one person but not anotherWho created the installable trigger and what they authorized.Review trigger ownership and recreate it under the intended owner if appropriate.
A web app reaches the wrong dataThe deployment's execution identity and audience.Review the deployment configuration and test in an approved isolated project.
An HTTP integration failsThe status code, provider's documented response, and redacted request metadata.Do not retry a write until you know whether the remote system received it. See Fetch data from web APIs.
A local change differs after uploadEmitted source, manifest, runtime, and target Script ID.Inspect the upload configuration and execution log. See Develop Apps Script locally.
The saved state no longer parses or has an unsupported versionThe exact property key, stored format and source version.Preserve the original value before inspection; do not silently initialize over it. See recovering a bad record.
A cache entry disappearedWhether the result can be recomputed from authoritative data.Rebuild the result; do not treat a cache miss as missing business state.
A paginated read stops with only some recordsThe page/item limits, provider next link and reported partial state.Retain the distinction between an accepted partial sample and a complete traversal; inspect failures before repeating requests.
An output ID is missing after a create errorThe saved intent, exact target and any recovery marker.Treat the result as uncertain. A null lookup, empty search or local error does not by itself authorize another create.
TypeError: X is not a functionThe receiver's class and the exact method name.Check the name against the declared methods for that class. See TypeError: X is not a function and choose the right service call.
Cannot read properties of null (reading 'getRange')The sheet lookup one line earlier.Guard the nullable result before dereferencing it. See Cannot read properties of null and JavaScript arrays.
TypeError: e.range is not a functionWhether range is a property of the event object.Drop the call parentheses; the property is already a Range. See TypeError: e.range is not a function and trigger event objects.
Cannot read properties of undefined (reading 'setDataValidation')The index or lookup that produced the range.Fix the out-of-range index or the lookup that returned nothing. See Cannot read properties of undefined.
The number of columns in the data does not match the number of columns in the rangeEvery row of the 2D array has the same length.Pad or trim the ragged row, then size the range from the data. See column count mismatch and JavaScript arrays.
The number of rows in the data does not match the number of rows in the rangeThe outer array length against the range height.Size the range from values.length instead of a separate count. See row count mismatch and batching writes.
The coordinates or dimensions of the range are invalidZero or negative rows, columns, or sizes in the getRange call.Guard empty results and remember coordinates are one-based. See invalid range dimensions and batching writes.
ReferenceError: X is not definedSpelling, scope, and whether every project file saved.Fix the typo or move eager top-level code into functions. See ReferenceError: X is not defined and functions and calls.
ReferenceError: GoogleAppsScript is not definedAny use of the type namespace in a value position.Use the service globals at runtime; keep GoogleAppsScript.* in type positions. See GoogleAppsScript is not defined and TypeScript builds.
Missing ) after argument listUnclosed parentheses in nested calls above the reported line.Close the delimiter the parser flagged; check the opening line, not only the reported one. See Missing ) after argument list and debug executions.
Unterminated string literalMissing quotes and non-ASCII quotes pasted from documents.Close the string or use a template literal for multiline text. See Unterminated string literal.
JSON.parse errors such as Unexpected tokenWhether the argument is a string, and what the endpoint actually returned.Parse response.getContentText() and check for an empty, incomplete or non-JSON body. See JSON.parse errors and connect services.

Follow this book's redaction policy: do not paste production tokens, private rows, or unredacted HTTP bodies into a support request or public issue. The Apps Script logging guide explains its privacy protections. A useful report names the execution time, surface, safe reproduction input, error text, and the smallest code path involved.

Example catalog

The book examples are runnable projects or read-only previews. Each linked chapter gives setup, expected results, side effects, and cleanup instructions.

ExampleWhat it demonstratesEffects
First Sheets scriptReading a supplied Sheets input.Reads the supplied customer rows; does not write data.
Values and objectsValues, objects, and pure calculations before service workflows.Changes in-memory fictional data and writes execution-log messages.
Functions and decisionsNamed helpers, pure functions, and control flow.Runs in-memory request-routing helpers and writes execution logs.
JavaScript arraysTransforming, filtering, and mapping row collections.Processes in-memory request arrays without modifying external data.
Batch request statusesReading and updating rectangular Sheet ranges in batched calls.Reads request rows and writes batched status updates to a practice tab.
Custom functionsFormula-driven calculations returned directly to spreadsheet cells.Returns computed values to calling cells without side effects.
Sheets validation and formattingAdding data validation rules, conditional formats, and edit timestamps.Modifies validation rules, formatting, and edit timestamps on a practice tab.
HTTP request previewInspecting a request before sending it.Logs a request description; does not contact the sample host.
Public forecastValidating external JSON before one bounded Sheets write.Makes one public GET and replaces the reserved Forecast!A1:C12, including attribution.
Public repository samplePaginated reads with separate record, page, and retry bounds.Reads bounded public GitHub metadata and logs a possibly partial sample.
Persisted request policyHistorical local decisions, per-user preferences, and disposable cache.Writes named Properties and cache entries; does not book a room or send a message.
Safe time-driven triggersInstalling and removing repeat-safe clock triggers under lock.Creates an hourly trigger and updates blank statuses without duplicate triggers.
Request trackerThe continuing Sheets automation combining batching, state, and triggers.Updates request rows and can install a time-driven trigger.
Drive file copyCopying a known Drive file by ID into a destination folder and recording the created file ID.Copies one configured template file into a selected Drive folder and stores the copy ID in Script Properties.
Docs report generationCopying a Docs template, replacing text placeholders, and styling tables.Creates a copied document and writes formatted briefing tables.
Gmail draft preparationSearching test threads, creating drafts, and reconciling draft state with the Gmail advanced service.Searches matching threads, creates Gmail drafts, and records draft IDs in Script Properties without sending mail by default.
Known Calendar eventsDates, instants, stored identities, and uncertain-create reconciliation.Creates or updates bounded practice events in a selected secondary calendar.
Private workshop formBranching, quiz feedback, native submission events, and known response IDs.Creates a practice form and an owner-installed trigger; the optional exercise stores fictional submissions.
Slides briefing deckCreating presentations, positioning shapes, and inserting metric cards.Creates a two-slide briefing deck in Google Drive.
Advanced Drive serviceDirect Google API calls with the Drive v3 advanced service.Queries Drive metadata with field masks without modifying files.
Bound Sheets menuReading a selected request through a menu or sidebar.Reads the selected row; does not write data.
Request-status web appDeploying doGet endpoints, HTML service templates, and user authorization.Serves a private HTML lookup page from a standalone project connected to a practice spreadsheet.
Custom event receiptsAn authenticated sender and receiver contract and retained duplicate identity.Sends bounded HTTP events and writes the receiver's receipt ledger; does not send email or create files.
Workspace add-onDrive homepage trigger, CardService cards, validated card actions, and user-scoped state.Renders a personal checklist card in the Drive side panel and stores user-scoped state without reading Drive files.
myFunction extensionIn-editor type checking, error diagnostics, and safe refactors.Analyzes code inside the browser editor without changing execution behavior.
Request tracker diagnosticsExecution timing, debugger breakpoints, structured logs, and resuming batches.Inspects spreadsheet rows and manages batch checkpoints in Script Properties.
Local request summaryA small local clasp workflow for a bound script.Reads a sheet and writes one execution-log line.
Test Apps Script codePure helper unit tests with Node.js and editor smoke tests on Sheets.Runs local assertions; smoke test creates and removes a disposable test tab.
TypeScript buildsCompiling TypeScript with tsc into upload-ready .gs files for clasp.Compiles local .ts files into verified .gs output without changing runtime behavior.
Versioned request plannerA producer's public calculation and a consumer's pinned version selection.Calculates fictional input and logs results; setup creates private projects and numbered library releases.
Separate OAuth grantConsent, callback, per-user token storage, refresh, and revocation.Configures and changes a provider grant, reads a fixed practice range, and maintains local credential state.
Use AI models from Apps ScriptStructured JSON outputs, schema validation, and checkpointed batches.Calls Gemini, OpenAI, or Anthropic APIs and writes validated suggestions to Sheets.
Google Chat appDirect-message events, interactive Chat cards, card updates, and removal lifecycle.Responds to direct-message request lookups with interactive cards and updates card state in Google Chat.
GitHub issues and Actions eventsScoped GitHub REST reads from Apps Script and signed event receipts from GitHub Actions.Reads one configured private issue via the GitHub REST API and records a signed Actions receipt in the custom endpoint.
Known embedded chartData versus presentation, builders, and stable output identity.Creates and updates one chart in a selected practice spreadsheet; uncertain creation requires inspection, not another insert.
File format bundlesValidating tabular input and packaging CSV, JSON, and a Doc-exported PDF into a ZIP archive.Reads a practice sheet, exports a Google Doc to PDF, and creates one private ZIP bundle in Google Drive.

Reference map

Choose the narrowest maintained reference for the question:

For databases, domain-wide delegation, and BigQuery, start with the owning product's official documentation. Google Chat apps, AI integrations, and add-on publication have their own chapters, Post notifications to Google Chat, Use AI models from Apps Script, and Install and release a Workspace add-on, but their product documentation remains the authority for current policy. Each integration has its own authorization, billing, operational, and policy requirements.

When you need to maintain a project rather than learn a new feature, return to debugging and quotas and local development.