3

I've just written my first Apps Script add-on for showing some links in a sidebar of a Docs document.

It looks like the way I created it made it bound to a specific document (the one from which I clicked Tools > Script Editor). When I open this document, the script shows up under the Add-ons menu item.

I would like the add-on to be available in my other documents as well, but I don't feel like publishing it: It requires me to add screenshots, icons, and other stuff that prevents me from being able to flesh out a script without too much fuzz.

I tried to publish it with "Private visibility" but that didn't make it available to my other documents (tried searching in Add-ons > Get add-ons).

So how do I make the script available to use in all my documents? Can I detach the script from the original document and would that help?

3
  • I think that questions like this that are related to the add-on publishing process should be asked on Stack Overflow mainly because publishing and add-on requires to pay the Google Developer fee. We could say that paying that fee makes us closer to the profile of SO users rather than to the "occasional user-defined functions for web applications programmer" :) Jun 27, 2018 at 17:10
  • 1
    @Rubén but the question is about how I can avoid having to publish.
    – bisgardo
    Jun 27, 2018 at 17:55
  • 1
    @Rubén: It seems borderline to me, and in such cases we default to leaving the question open. Ironically, though, Halle, you'd almost certainly get an answer at Stack Overflow (if it doesn't get closed). I don't know if you will here.
    – ale
    Jun 27, 2018 at 18:20

1 Answer 1

1

I tried to publish it with "Private visibility" but that didn't make it available to my other documents (tried searching in Add-ons > Get add-ons).

...

So how do I make the script available to use in all my documents?

Publishing and add-on as privately (unlisted or limited to a group of users) will not display the add-on on the add-ons store, except for those that use Google Apps / G Suite account.

To install the add-on, the publisher should grab the add-on listing URL and share it with the users in order to make them be able to install it.

To grab the add-on listing URL, on the Chrome Web Store dashboard, click on the name of the published add-on.

That will open the add-on listing.

Grab the URL shown on the web browser address bar (Chrome call it omnibox). If it contains ?authuser=n or &authuser=n, where n will be an integer, remove that part and share the URL with the add-on users.

To install the add-on for yourself, click the Free button.


Can I detach the script from the original document and would that help?

The way to "detach" a script from a document, is to create an standalone Apps Script project but it could involve to make changes to the code as there some features that can't be tested directly like methods that get the active document and that are blocked when the script is run from Run > Test as add-on.... This rather than making the things easier could be a bit harder and if the add-on is intended your use only, there is not an important gain unless you will use a development process that requires a stand-alone Apps Script project.

5
  • Ok so what you're saying is that I have to publish the script even to be able to use it just within my own account - the account that owns the script? Can you tell me how I install the add-on using the URL. Thanks.
    – bisgardo
    Jun 27, 2018 at 18:01
  • @HalleKnast To install the add-on once you publish the add-on, open the add-on listing, click the "Free" button. Jun 27, 2018 at 18:08
  • @HalleKnast Regarding "have to publish...", no you don't have to do that. You could use run> test as add-on but you should add each file to the corresponding list and open the files from there in order that the add-on works. Another alternative is to use your code as a library but you should create a bounded script project for each of your documents. Jun 27, 2018 at 18:33
  • 4
    Thanks, this works. I do find it almost unbelievable that just making a simple script for your own use is this cumbersome :(
    – bisgardo
    Jun 27, 2018 at 23:26
  • Halle Knast haha, I know right?
    – LekeOpe
    Apr 3, 2019 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.