Keeping all those Google Apps script ‘shortcuts’ under control

I don’t know about you, but I have trouble keeping all my various Google Apps Script shortcuts and keys (links to workbooks, links to content service queries, library keys and so on) under control and organized. I think that previous posts about using the scriptDB as a lockbox, using Google Apps Script as a jsonP proxy and various others showed the power of ScriptDB for sharing data both inside and outside the Google Apps Script environment.

On the Excel Liberation site I have a lot of examples of Google Apps Script, and use the content service to provide data in jSon format to Excel queries, and it was getting hard to organize. So of course my solution is to create another rest API to describe all the details of scripts and workbooks i have published. This follows along the lines of somewhere to keep those api keys

This will return published scripts and workbooks, along with their public links, links to the source code, and project keys along with a few other useful things. The good thing about this is that we have all the details about all shared workbooks and scripts accessible by a simple name, by anything that can deal with jSon.

It takes the optional parameter ?entry=name. No parameters will give all public scripts

Here’s the response for an example entry, scraperwikiquery.


The code for this is rehash of previous posts. As usual you’ll need the mcpher shared library.

First, create a public facing script, and publish it. I’m calling this publicStuff.


Next, in  a different script, create a module to populate everything you want to make public and run it once off, using the first script as a library. here’s a snippet…

About brucemcp 225 Articles
I am a Google Developer Expert and decided to investigate Google Apps Script in my spare time. The more I investigated the more content I created so this site is extremely rich. Now, in 2019, a lot of things have disappeared or don’t work anymore due to Google having retired some stuff. I am however leaving things as is and where I came across some deprecated stuff, I have indicated it. I decided to write a book about it and to also create videos to teach developers who want to learn Google Apps Script. If you find the material contained in this site useful, you can support me by buying my books and or videos.

1 Comment

Leave a Reply

Your email address will not be published.


15 + 1 =