google-apps-scriptgoogle-sheetsgoogle-domain-api

Deploying my custom Google Sheet


I have been searching for an answer, more that likely using the wrong terminology, to my question and I have read through the Google documentation but I am now more confused than when I started looking for the answer.

I'm new to Google Apps and a complete beginner at Javascript. I recently started working in a Google Apps school (we have our own domain) and I have started developing some custom Google Sheets to aid other teachers and boost productivity.

I have developed a Sheet with some custom scripts and a custom menu bar to call the various functions of the script. Since I am so new to Javascript my scripts have some bugs that I fix as other users report them to me. However, my problem is that when I fix a bug in my "master" Sheet the end user must open the shared master Sheet and make a copy of it to benefit from the update. I want to update to be pushed out to all copies of the sheet (circa 4 copies)

I know need to deploy it but I don't know whether I need to deploy it as a web app or a sheets add-on from the script editor? Again, we have our own domain so I do believe I don't need to have it approved by Google to use it internally in our domain?


Solution

  • Based from this documentation, public add-ons require a review before publication, since you have your own domain, you can publish just for users within your domain without a review.

    To publish an add-on for the first time, follow these steps. If you also want to let Google Apps domain administrators install and authorize your add-on for all users in their domain, follow the steps for domain-wide publication as well.

    When you fixed your bugs and wanted it to be updated to all copies of sheets, you can follow this Update your add-on link to update an add-on that you have already published.

    1. Open the add-on project in the script editor.
    2. Make the necessary changes to your code, then save a new version of your project by clicking File > Manage versions, then Save New Version. Close the Manage Versions dialog.
    3. Click Publish > Deploy as add-on. (Or Sheets or Docs or Forms add-on.)
    4. In the dialog that appears, change the add-on's details as needed, select the new version of your script, then click Update store item. (If you change the add-on's name, make sure you also change the name of the Apps Script project to match, as the project name is shown in the authorization dialog.)
    5. In the store listing, click Publish changes, then click OK in the dialog that appears.

    Hope this helps!