Last active
March 21, 2023 12:00
-
-
Save phillypb/61e2d9252e4d7b0dbf20a2b8dbe56b03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function saveToProperties() { | |
// save to User Properties in one go | |
var userProperties = PropertiesService.getUserProperties(); | |
var newProperties = { | |
sourceFolderId: '123', | |
destinationFolderId: '456', | |
}; | |
userProperties.setProperties(newProperties); | |
Logger.log("Successfully stored User Properties"); | |
} | |
function getFromProperties() { | |
// run Function to get from User Properties | |
var userProperties = PropertiesService.getUserProperties().getProperties(); // returns an Object | |
Logger.log(userProperties); | |
// log each item from User Properties | |
Logger.log(userProperties.destinationFolderId); | |
Logger.log(userProperties.sourceFolderId); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment