This is the gatsby-styled-blog-starter demo site. To download the code and get some instructions visit the Github repository . To be informed about updates follow @greglobinski

The Properties Service

Using the properties service to dynamically access data in your projects

November 20, 2017

Another dope idea from the yearbook guru @jentechnology.

I noticed that she was asking about a better way to store notes inside of a slidedeck. She uses Google Keep currently, but wondered if there is an add-on available.

I don’t know of one, but we can definitely build it! The properties service is a way to save data INSIDE a document. There are 3 different services available.

  1. PropertiesService.getScriptProperties() is for all the users of a specific script.

  2. PropertiesService.getDocumentProperties() is for all the users of a single, specific document.

  3. PropertiesService.getUserProperties() is for only the specific user saving the properties.

Each serves a specific purpose, and in this case we want to use the same properties in any slideshow that we use this add-on, so we are choosing the Script properties. However, they are all used the same way!

Since the properties service is only capable of saving simple data, we can’t directly save an object, so we need to stringify it first. Below I am sharing two simple functions that allow you to save an array into the script properties.

function putTheme(theme) {
  var props = JSON.parse(PropertiesService.getScriptProperties().getProperty('THEMES')) || [];


  PropertiesService.getScriptProperties().setProperty('THEMES', JSON.stringify(props));

  return props;

function getThemes() {
  var props = JSON.parse(PropertiesService.getScriptProperties().getProperty('THEMES')) || [];

  return props;

For the full code, check out the github repository! If you want to contribute, 1) fork the repo, 2) make changes, 3) share your changes back with the community!


jordan rhea I started as a teacher and taught myself to code with Python and JavaScript. Now I am passionate about sharing code and strategies to make teachers (and other G Suite users) as effective as possible with technology.

© jordan rhea 2018