Saves multiple key-value pairs at once.
class PropertiesService method .setProperties()
PropertiesService is the Apps Script service.
.setProperties() is the method name you will see after a dot in your code.
What it does
Why it's used
- Write several settings at once after onboarding.
- Bulk-update config from a settings sheet.
Common errors
- Forgetting parentheses on setProperties. Write PropertiesService.setProperties(), not PropertiesService.setProperties or setProperties by itself.
- Skipping dots between chained calls. Each step needs a dot, like PropertiesService.setProperties().
- Adding spaces where they do not belong. Write PropertiesService.setProperties(), not PropertiesService .setProperties(), PropertiesService.setProperties (), or PropertiesService . setProperties().
- Wrong capitalization. Use PropertiesService and setProperties, not propertiesservice or setproperties.
Explore
Related methods
-
.setProperty()
Saves a single key-value pair.
-
.getProperties()
Returns all stored key-value pairs.
-
.getUserProperties()
Returns key-value storage private to the current user.
-
.deleteProperty()
Removes a stored value by key.
-
.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.