apps-script-utils 2.1.1 Help

Google Apps Script module

Functions scoped to specific Google Apps Script services: Sheets, Slides, Admin SDK, Drive, Docs, Forms, network requests, and the built-in UI classes.

A New marker indicates a function added in the latest release; a Deprecated marker indicates a function scheduled for removal in a future release.

Google Base Methods

General-purpose helpers used across the Google Apps Script modules below.

Function

Return type

Brief description

getByteSize

Number

Calculates the size of a string in bytes (UTF-8).

getTriggerById New

Trigger \| null

Retrieves a project trigger by its unique id, or null when the project has none.

Google Admin SDK Directory Methods

Helpers for the Admin SDK Directory Service.

Function

Return type

Brief description

isAdmin

Boolean

Checks if the current user is an administrator of the Google Workspace domain.

nonAdmin New

Boolean

Checks if the current user is not an administrator of the Google Workspace domain.

requireAdmin New

void

Ensures the current user is a domain administrator, throwing otherwise.

Google Drive Methods

Helpers for Google Drive.

Function

Return type

Brief description

createFolder New

Folder

Creates a nested folder tree from a path, reusing the folders that already exist.

Google Docs Methods

Helpers for Google Docs. Not implemented yet. Contributions are welcome — see Contributing.

Google Forms Methods

Helpers for Google Forms. Not implemented yet. Contributions are welcome — see Contributing.

Google Sheets Methods

Helpers for reading, writing, and validating Google Sheets data: row and column manipulation, A1-notation parsing, GridRange comparisons, and type guards for Sheet, Spreadsheet, and Range objects.

Function

Return type

Brief description

appendColumn

Sheet

Appends one column after the last column that holds data, on a sheet or inside a range.

appendColumns

Sheet

Appends columns after the last column that holds data, on a sheet or inside a range.

appendRow

Sheet

Appends one row after the last row that holds data, on a sheet or inside a range.

appendRows

Sheet

Appends rows after the last row that holds data, on a sheet or inside a range.

clearColumnsByConditional New

Number

Clears the columns a predicate selects, on a sheet or inside a range.

clearRowsByConditional New

Number

Clears the rows a predicate selects, on a sheet or inside a range.

convertRichTextToHtml

String

Converts a RichTextValue to its HTML representation.

deleteColumnsByConditional New

Number

Removes the columns a predicate selects, on a sheet or inside a range.

deleteRowsByConditional New

Number

Removes the rows a predicate selects, on a sheet or inside a range.

doGridRangesIntersect

Boolean

Checks if two GridRange objects overlap on the same sheet.

extractRangeFromA1Notation New

String \| null

Extracts the range part (e.g., A1:B2) from a full A1 notation string.

extractSheetNameFromA1Notation

String \| null

Extracts the sheet name part from an A1 notation string.

getColumnIndexByLetter

Number \| null

Converts a column letter (e.g., A) to a 0-based column index.

getColumnLetterByIndex

String

Converts a 0-based column index to its letter representation (e.g., 0-> A).

getColumnLetterByPosition

String

Converts a 1-based column position to its letter representation.

getColumnPositionByLetter

Number \| null

Converts a column letter to a 1-based column position.

getNamedRangeByName New

NamedRange \| null

Looks up a named range by its exact name, or null when the spreadsheet has none.

getSchema New

SheetSchema \| null

Returns a sheet's stored schema, or one inferred from its contents, marked as inferred.

getSheetById

Sheet \| null

Retrieves a Sheet object by its unique ID.

getSheetByIndex

Sheet \| null

Retrieves a Sheet object by its zero-based index.

getValues New

Array

Reads a sheet or a range as rows, optionally keyed by a header row, filtered and paged.

highlightHtml

String

Applies syntax highlighting to an HTML string.

insertSchema New

Sheet

Applies a declarative schema to a sheet and records it as developer metadata.

isCellGridRange

Boolean

Validates if a GridRange represents exactly one cell.

isGridRangeContainedIn

Boolean

Determines if one GridRange is fully enclosed within another.

isGridRangeSameDimensions

Boolean

Checks if two GridRange objects have identical height and width.

isRange

Boolean

Validates if a value is a Google Apps Script Range object.

isRichTextValue

Boolean

Validates if a value is a Google Apps Script RichTextValue object.

isSheet

Boolean

Validates if a value is a Google Apps Script Sheet object.

isSpreadsheet

Boolean

Validates if a value is a Google Apps Script Spreadsheet object.

isTextStyle

Boolean

Validates if a value is a Google Apps Script TextStyle object.

isValidSheetId

Boolean

Validates the format of a sheet ID.

isValidSheetName

Boolean

Validates if a string is a valid Google Sheets name.

isValidSpreadsheetId

Boolean

Validates the format of a Google Spreadsheet ID.

nonCellGridRange New

Boolean

Checks if a grid range does not denote exactly one cell.

nonGridRangeContainedIn New

Boolean

Checks if one grid range is not contained within another.

nonGridRangeSameDimensions New

Boolean

Checks if two grid ranges do not have the same dimensions.

nonRange

Boolean

Checks if a value is NOT a Google Apps Script Range.

nonRichTextValue New

Boolean

Checks if a value is not a RichTextValue object.

nonSheet

Boolean

Checks if a value is NOT a Google Apps Script Sheet.

nonSpreadsheet New

Boolean

Checks if a value is not a Spreadsheet object.

nonTextStyle New

Boolean

Checks if a value is not a TextStyle object.

nonValidSheetId New

Boolean

Checks if a value is not a valid sheet identifier.

nonValidSheetName New

Boolean

Checks if a value is not a valid sheet name.

nonValidSpreadsheetId New

Boolean

Checks if a value is not a valid spreadsheet identifier.

parseA1Notation New

GridRange

Parses an A1 notation string into a structured GridRange object.

parseA1Notations New

GridRange[]

Parses a list of comma-separated A1 notations into an array of GridRange objects.

prependColumn New

Sheet

Inserts one column before the data, at the start of a sheet or before a range, optionally filling it.

prependColumns New

Sheet

Inserts columns before the data, at the start of a sheet or before a range, optionally filling them.

prependRow

Sheet

Inserts one row before the data, at the top of a sheet or above a range.

prependRows

Sheet

Inserts rows before the data, at the top of a sheet or above a range.

removeSchema New

Boolean

Takes a schema off a sheet, and optionally the validation rules it applied, leaving values untouched.

requireCellGridRange New

GridRange

Ensures a grid range denotes exactly one cell, throwing otherwise.

requireGridRangeContainedIn New

GridRange

Ensures one grid range lies within another, throwing otherwise.

requireGridRangeSameDimensions New

void

Ensures two grid ranges have the same dimensions, throwing otherwise.

requireRange

Range

Ensures a value is a Range, otherwise throws an exception.

requireRichTextValue New

RichTextValue

Ensures a value is a RichTextValue object, throwing otherwise.

requireSheet

Sheet

Ensures a value is a Sheet, otherwise throws an exception.

requireSpreadsheet New

Spreadsheet

Ensures a value is a Spreadsheet, otherwise throws an exception.

requireTextStyle New

TextStyle

Ensures a value is a TextStyle object, throwing otherwise.

requireValidSheetId New

Number

Ensures a value is a valid sheet identifier, throwing otherwise.

requireValidSheetName New

String

Ensures a value is a valid sheet name, throwing otherwise.

requireValidSpreadsheetId New

String

Ensures a value is a valid spreadsheet identifier, throwing otherwise.

sortSheets

void

Alphabetically sorts all sheets within a spreadsheet.

toA1Notation

String

Converts a GridRange object back to A1 notation.

updateFormulas New

Number

Rewrites the formulas of a sheet or of one range, returning how many changed.

updateSheetNameInA1Notation New

String

Updates or sets the sheet name within an A1 notation string while preserving the range.

Google Slides Methods

Helpers for Google Slides: slide lookup and indexing, conversion between Markdown and RichTextRun, find-and-replace, and type guards for Presentation and Slide objects.

Function

Return type

Brief description

convertMarkdownToRichText New

RichTextRun[]

Converts Markdown-formatted text to an array of RichTextRun objects.

convertRichTextToMarkdown New

String

Converts an array of RichTextRun objects back into Markdown.

findReplaceAllTextInSlide New

Number

Finds and replaces all occurrences of text within a slide.

getSlideByIndex New

Slide \|null

Retrieves a slide by its zero-based index, in a given presentation or in the active one.

getSlideIndex New

Number \| null

Retrieves the zero-based index of a slide, in a given presentation or in the active one.

isPresentation New

Boolean

Validates if a value is a Google Apps Script Presentation object.

isSlide New

Boolean

Validates if a value is a Google Apps Script Slide object.

isValidPresentationId New

Boolean

Validates if a string is a valid Google Slides presentation ID.

isValidSlideId New

Boolean

Validates if a string is a valid Google Slides slide ID.

nonPresentation New

Boolean

Checks if a value is not a Presentation object.

nonSlide New

Boolean

Checks if a value is not a Slide object.

nonValidPresentationId New

Boolean

Checks if a value is not a valid presentation identifier.

nonValidSlideId New

Boolean

Checks if a value is not a valid slide identifier.

requirePresentation New

Presentation

Ensures a value is a Presentation object, throwing otherwise.

requireSlide New

Slide

Ensures a value is a Slide, otherwise throws an exception.

requireValidPresentationId New

String

Ensures a value is a valid presentation identifier, throwing otherwise.

requireValidSlideId New

String

Ensures a value is a valid slide identifier, throwing otherwise.

Network Methods

Helpers for network-related operations, such as validating request tokens.

Function

Return type

Brief description

requireValidToken New

String

Ensures that a valid token is provided and matches the allowed keys.

Google UI Methods

Helpers for user-facing output — Ui, HtmlOutput, and TextOutput type guards — plus dependency guards for repositories and services used in web apps.

Function

Return type

Brief description

checkMultipleAccount

Boolean

Detects if the user is logged into multiple Google accounts simultaneously.

isHtmlOutput

Boolean

Validates if a value is a Google Apps Script HtmlOutput object.

isTextOutput

Boolean

Validates if a value is a Google Apps Script TextOutput object.

isUi

Boolean

Validates if a value is a Google Apps Script Ui object.

nonHtmlOutput New

Boolean

Checks if a value is not an HtmlOutput object.

nonTextOutput New

Boolean

Checks if a value is not a TextOutput object.

nonUi New

Boolean

Checks if a value is not a Ui object.

requireHtmlOutput New

HtmlOutput

Ensures a value is an HtmlOutput object, throwing otherwise.

requireRepository New

T

Ensures that a repository is defined.

requireService New

T

Ensures that a service is defined.

requireTextOutput New

TextOutput

Ensures a value is a TextOutput object, throwing otherwise.

requireUi New

Ui

Ensures a value is a Ui object, throwing otherwise.

23 September 2026

This documentation was generated with AI (Claude) from the library's source code.