0

I am setting up a DTAP environment for Google App Maker. Google App Maker enables working in a singe file very well, however there is one use case that I would like to simplify.

For each deployment I need to "know" certain things in the back end script. Things like the ip address of the SQL server, or usernames and passwords. This information needs to be retrieved fast and often, given the stateless nature of google.script.run.

The best solution so far is a settings form, combined with google drive tables and caching. This works, but it is not simple, and things could fail easily. The other approach is hard coded and linked to the deployment url. This is fast and simple, but also means that all the credentials are in the source.

I am looking for a better solution. Apps Script used to have the script properties. Is there a similar option in App Maker, with a UI to maintain the settings.

Jasper Duizendstra
  • 2,587
  • 1
  • 21
  • 32

1 Answers1

1

There is no built-in UI to manage script properties, but App Maker's runtime (Apps Script) provides API to perform CRUD operations on it:

PropertiesService.getScriptProperties().setProperty('testKey', 'testValue');

...and you can 'easily' build the UI on top of this API. In answer for this question are highlighted major steps to achieve this: Google App Maker how to create Data Source from Google Contacts

Here is a feature request for the first party support. You can up-vote it by giving it a star: https://issuetracker.google.com/issues/73584947

Pavel Shkleinik
  • 6,298
  • 2
  • 24
  • 36
  • Thanks Pavel, but I don't want a UI. The way it works with Apps Script would be perfect, simple and where I need it at the deployment. Is there no way to reach the underlying Apps Script file and use that to change the properties using the Apps Script editor for the deployment? – Jasper Duizendstra Feb 06 '18 at 17:23
  • Unfortunately no, App Makers keeps its secrets behind closed doors, in other words, app developers don't have access to deployments (Apps Script apps). – Pavel Shkleinik Feb 06 '18 at 17:38
  • 1
    I accepted the answer and filed a feature request: https://issuetracker.google.com/issues/73584947 – Jasper Duizendstra Feb 20 '18 at 08:02