Answers for "google apps script properties service"

1

google apps script properties service

// Sets several script properties, then retrieves them and logs them.

// Initialize the service
let documentProperties = PropertiesService.getDocumentProperties();
// Set the properties
documentProperties.setProperties({
  'cow': 'moo',
  'sheep': 'baa',
  'chicken': 'cluck'
});
// Retrieve the properties
let animalSounds = documentProperties.getProperties();
// Loop through the properties and log them
for (var kind in animalSounds) {
  console.log('A %s goes %s!', kind, animalSounds[kind]);
}
// Logs:
// A chicken goes cluck!
// A cow goes moo!
// A sheep goes baa!
Posted by: Guest on January-15-2021

Code answers related to "google apps script properties service"

Code answers related to "Javascript"

Browse Popular Code Answers by Language