Returns key-value storage shared by everyone using the script.
class PropertiesService method .getScriptProperties()
PropertiesService is the Apps Script service.
.getScriptProperties() is the method name you will see after a dot in your code.
What it does
Why it's used
- Store API keys or config shared by every user of the script.
- Remember settings that should not live in a cell.
Common errors
- Forgetting parentheses on getScriptProperties. Write PropertiesService.getScriptProperties(), not PropertiesService.getScriptProperties or getScriptProperties by itself.
- Skipping dots between chained calls. Each step needs a dot, like PropertiesService.getScriptProperties().
- Adding spaces where they do not belong. Write PropertiesService.getScriptProperties(), not PropertiesService .getScriptProperties(), PropertiesService.getScriptProperties (), or PropertiesService . getScriptProperties().
- Wrong capitalization. Use PropertiesService and getScriptProperties, not propertiesservice or getscriptproperties.
Explore
Related methods
-
.getUserProperties()
Returns key-value storage private to the current user.
-
.getDocumentProperties()
Returns key-value storage tied to the current spreadsheet or doc.
-
.getProperties()
Returns all stored key-value pairs.
-
.setProperties()
Saves multiple key-value pairs at once.
-
.getProperty()
Reads a single stored value by key.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.