Can you set a value in the ScriptProperty of a AppScript Project before pushing via clasp?

78 views Asked by At

I would like to set a value programmatically in the ScriptProperty before I push it via clasp but I could not find a way to do it.

I also could not find any API to set it from outside.

1

There are 1 answers

7
Fernando Lara On

I'm afraid this is not possible. The Google Apps Script API does not support managing or retrieving information from script properties yet, therefore when using the API you won't be able to see that info.

Because of that when cloning projects using clasp the result is the same, that information will not appear anywhere, hence it can't be managed.

The only available option so far to manage this information is using the setProperties() method from the Properties class from Apps Script itself, but they can't be managed locally before being pushed with clasp in case your end goal was to push changes to the project including all the properties values. The only way is to push the changes to the script and then push the update to the values.

I would still consider this a good idea. I would recommend posting this as a feature request in the Google's issue tracker to see if they can make it possible in the near future.

References: