Reads a single stored value by key.
class PropertiesService method .getProperty()
PropertiesService is the Apps Script service.
.getProperty() is the method name you will see after a dot in your code.
What it does
Why it's used
- Read one config value like webhook URL or API key.
- Lightweight lookup without loading every property.
Common errors
- Forgetting parentheses on getProperty. Write PropertiesService.getProperty(), not PropertiesService.getProperty or getProperty by itself.
- Skipping dots between chained calls. Each step needs a dot, like PropertiesService.getProperty().
- Adding spaces where they do not belong. Write PropertiesService.getProperty(), not PropertiesService .getProperty(), PropertiesService.getProperty (), or PropertiesService . getProperty().
- Wrong capitalization. Use PropertiesService and getProperty, not propertiesservice or getproperty.
Explore
Related methods
-
.deleteProperty()
Removes a stored value by key.
-
.getProperties()
Returns all stored key-value pairs.
-
.setProperty()
Saves a single key-value pair.
-
.getUserProperties()
Returns key-value storage private to the current user.
-
.getDocumentProperties()
Returns key-value storage tied to the current spreadsheet or doc.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.