New G-Suite Admin looking for tutorial on publishing app script within my domain only.

95 views
Skip to first unread message

Josh Barnes

unread,
May 29, 2019, 7:26:10 PM5/29/19
to Google Apps Script Community

Hello everyone,

Is there a tutorial where I can be walked through the spaghetti pile of security keys, project IDs, etc. required publish an add-on for my company? I've got several scripts that I'd like to deploy within my own G-Suite domain.  My company uses Google Sheets for invoices and go through through the OAuth permission process 20+ times a day.  I've tried to figure out how to deploy the script on my own using google documentation but keep failing.

Thanks in advance!

Clark Lind

unread,
May 30, 2019, 7:44:00 AM5/30/19
to Google Apps Script Community
I don't know if this is what you are looking for, but I found this:
(source: https://support.google.com/a/answer/6160020?hl=en )

Add or remove domain whitelisting

  1. Sign in to your Google Admin console.

    Sign in using an administrator account, not your current user account

  2. From the Admin console Home page, go to Domains.

    To see Domains, you might have to click More controls at the bottom.

  3. Click Whitelisted external domains.
  4. Enter the name of the trusted domain to whitelist, then click Add(I assume you just enter your own domain - Clark)
  5. Click Save.

Alan Wells

unread,
May 30, 2019, 8:45:06 AM5/30/19
to Google Apps Script Community
The users need to re-authorize the script every time that they use it?


On Wednesday, May 29, 2019 at 7:26:10 PM UTC-4, Josh Barnes wrote:

Josh Barnes

unread,
May 30, 2019, 12:12:47 PM5/30/19
to Google Apps Script Community
Yes because each invoice is a new document.

Alan Wells

unread,
May 30, 2019, 1:12:55 PM5/30/19
to Google Apps Script Community
What are the scopes that the Apps Script project uses?  Files menu, Project properties, scopes.  Or the Manifest file - appsscript.json - View menu, Show manifest file.

Josh Barnes

unread,
May 30, 2019, 5:57:23 PM5/30/19
to Google Apps Script Community
{
  "timeZone": "America/Los_Angeles",
  "dependencies": {
    "enabledAdvancedServices": [{
      "userSymbol": "Gmail",
      "serviceId": "gmail",
      "version": "v1"
    }, {
      "userSymbol": "Calendar",
      "serviceId": "calendar",
      "version": "v3"
    }, {
      "userSymbol": "Drive",
      "serviceId": "drive",
      "version": "v2"
    }, {
      "userSymbol": "AdminDirectory",
      "serviceId": "admin",
      "version": "directory_v1"
    }, {
      "userSymbol": "AppsActivity",
      "serviceId": "appsactivity",
      "version": "v1"
    }, {
      "userSymbol": "AdminReports",
      "serviceId": "admin",
      "version": "reports_v1"
    }, {
      "userSymbol": "Sheets",
      "serviceId": "sheets",
      "version": "v4"
    }, {
      "userSymbol": "DriveActivity",
      "serviceId": "driveactivity",
      "version": "v2"
    }]
  },
  "webapp": {
    "access": "MYSELF",
    "executeAs": "USER_DEPLOYING"
  },
  "exceptionLogging": "STACKDRIVER"

Alan Wells

unread,
May 31, 2019, 10:37:01 AM5/31/19
to Google Apps Script Community
I haven't done much with OAuth and APIs outside of the built-in services.  Hopefully someone else can help you.  It seems like your code might be loosing the token?  Do you need to generate a new token every time that the code runs?

Josh Barnes

unread,
Jun 3, 2019, 4:35:28 PM6/3/19
to google-apps-sc...@googlegroups.com
AJ,

It doesn't say anything about tokens. It makes me go through 3 OAuth permission steps below every time we run a duplicate version of the file which is 20+ times a day.

Screen Shot 2019-06-03 at 1.24.57 PM.png

Screen Shot 2019-06-03 at 1.25.39 PM.png

Screen Shot 2019-06-03 at 1.26.11 PM.png



Alan Wells

unread,
Jun 3, 2019, 6:14:26 PM6/3/19
to Google Apps Script Community
Sorry, I don't know what the problem is.  If you make a copy of the file, then the new file will always need to be authorized.  Authorization isn't carried over to copied files.

Riël Notermans

unread,
Jun 4, 2019, 2:00:36 AM6/4/19
to Google Apps Script Community
Publishing addons is described here:


It is indeed the way to go.

You are creating copies of your script now and they need ask for permission each.

Op di 4 jun. 2019 00:14 schreef Alan Wells <aj.a...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/c330d1b4-7a84-49ff-9920-44b79b58cd40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Josh Barnes

unread,
Jun 4, 2019, 12:58:00 PM6/4/19
to Google Apps Script Community
Thank you all for the responses. I understand and agree that an add-on is the way to go - I'm seeking a tutorial to walk me through that enormously complex add-on publishing process.  I've tried to figure out how to deploy the script using the documentation you linked to but keep failing.  Any tutorial-ish stuff to help me though the process would be amazing.  If there were a YouTube tutorial series on the process I imagine there'd be a lot more people successfully publishing their own add-ons.

Alan Wells

unread,
Jun 4, 2019, 1:34:12 PM6/4/19
to Google Apps Script Community
I did create one video.  It's not a comprehensive explanation of the process.  It focuses on the Google Cloud platform part.


For someone to create a comprehensive tutorial could be a lot of work.  Lots of work and little to no reward.  That's probably why it doesn't exist.
Reply all
Reply to author
Forward
0 new messages