Google app
Script utilities
UrlFetchApp, PropertiesService, and LockService work across Google apps to call HTTP endpoints, store key-value settings, and guard shared resources.
Choose a task using Script utilitiesStart with an outcome
Tasks that use Script utilities
Choose the result first. The service flow shows what this automation connects.
- Script utilities Import data from a web API into Sheets
The script reads Open-Meteo once and replaces only Forecast!A1:C12 after checking the response and the destination. It preserves the source and licence links beside the forecast.
- Script utilities Store settings with PropertiesService
PropertiesService.getScriptProperties() stores small key-value settings with the Apps Script project. Save a setting once with setProperties(), then read it on every run with getProperty().
- Script utilities Check a website and alert when it is down
An hourly trigger fetches one address. The script remembers the last result in a script property, so a long outage produces one alert instead of one every hour.
Snippets
Small pieces for Script utilities
Complete functions you can paste and run one at a time.
- 12 snippets Dates, text, and array snippets
Each one is a complete, runnable function you can paste into the Apps Script editor to see a date, currency, or array helper work on real values.
- 12 snippets Triggers and script control snippets
Each snippet is a complete function that installs a trigger, remembers a value between runs, or reports a failure, ready to paste into the Apps Script editor.
- 10 snippets Web request snippets
Each snippet is a complete function that calls a URL with UrlFetchApp, ready to paste into the Apps Script editor and adapt to your own API.
Object reference
Objects available in Script utilities
Open an object when you need to get it, try a common action, or inspect exact method signatures.
- Object reference HTTP response
UrlFetchApp.fetch() returns an HTTPResponse after calling a URL. Pass muteHttpExceptions: true so error status codes return an HTTPResponse you can check with getResponseCode() and getContentText().
- Object reference Properties
Properties store key and value text pairs between runs with getProperty() and setProperty(). PropertiesService.getScriptProperties() is shared across the project, user properties are per-person, and document properties are per-file.
- Object reference Lock
A LockService.Lock keeps two trigger executions from editing the same Sheet, Doc, or property at the same time. Acquire it with tryLock(timeoutInMillis) and release it in a finally block.