22

Is it somehow possible to publish add-on without Google approval if it is going to be used for my internal use only?

If not, is there any possibility to make some of the Google Apps Script projects global. So that I would not need to copy same code/functionality to another spreadsheets or docs to get my custom macros to work again.

TheMaster
  • 45,448
  • 6
  • 62
  • 85
Maksim Luzik
  • 5,863
  • 4
  • 36
  • 57

3 Answers3

27

Yes. An Add-On can be published as private from the Workspace Marketplace SDK. A private add-on is restricted to the domain/Workspace Account that the Apps Script file is in.

https://developers.google.com/apps-script/add-ons/publish

An add-on can also be published as unlisted. Publishing the add-on as private to the Workspace account is not the same as publishing an add-on as unlisted. An unlisted add-on is technically public, it's just not shown in the Workspace Marketplace. To install an unlisted add-on the users need the link.

There are two different approvals for an add-on. One for the OAuth consent, and another for the function of the add-on. The OAuth consent is for asking the user for permission to different services / access in their account. The function of the add-on is for appearance, content and whether it works or not.

Both private and unlisted Add-ons are actually published to the Workspace Marketplace, but who is allowed to access/see them is what is controlled. You need to create a "standard" Google Cloud Project, associate it with your Apps Script project, and then enable the Workspace Marketplace SDK, and configure settings in the Workspace Marketplace SDK.

To get to your Google Cloud Platform dashboard, use the URL

https://console.cloud.google.com/home/dashboard

  • From "IAM and Admin" navigate to "Manage Resources"
  • If you don't have an organization name, then create an organization. NOTE: An organization can only be set up through a Workspace account OR through "Cloud Identity." https://cloud.google.com/resource-manager/docs/creating-managing-organization#acquiring
  • Create a new GCP project
  • Get the GCP Project Number
  • Put the GCP Project Number into the Apps Script project
  • Navigate to the APIs and Services dashboard.
  • Make sure that the project that you want to use is listed in the drop down
  • Click "Enable APIs and Services"
  • Search for Workspace Marketplace
  • Enable the Workspace Marketplace SDK
  • Configure the Workspace Marketplace SDK

There is also the option to make an Apps Script project file available to other Apps Script projects as a "library." A library can be made available to other Apps Script projects, by providing the "project key" of the source Apps Script (library).

Whoever wants to use the source Apps Script file as a library needs the project key. To find the project key, from the code editor choose "File" - "Project Properties" and look for "Project key (Deprecated)"

To add an Apps Script file as a library, from the code editor, choose "Resources" - "Libraries". You don't need to do anything to create a Library. Every Apps Script project is available as a Library. All you need to do is share the Project Key.

You can add an "Add-On" menu item to a Google Spreadsheet or Doc, without publishing an Add-On, and that Add-On menu item will run any code that is in that document, just like an add on. But you would need to edit the document of every user you wanted to deploy the code to, and manually add the code to their document.

If the Apps Script file is not published as an add-on, then there's no point in creating an Add-On menu, since you can create a custom menu.

Alan Wells
  • 30,746
  • 15
  • 104
  • 152
  • Thanks for the throughout answer. – Maksim Luzik Mar 11 '15 at 20:25
  • 1
    I already included my Google Forms add-on as Library, but there is no option to share the project key, not even in the File menu. I built this add-on based on a specific form, but I want to make it privately available to all my other forms without duplicating the code files across all form. Google Forms don't seem to allow a custom menu item to be added though. Any suggestions? Thanks! – Antonio Ooi Sep 26 '16 at 11:01
  • Can you clarify how a library works? For instance, I added the project create to Libraries but when I open a page the item it should add to the add-ons menu does not get created, and thus I am unable to access my functionality. – Michael Apr 25 '18 at 23:21
  • @Michael Your question may be difficult to answer without knowing the details. Please read the [troubleshooting guide](https://developers.google.com/apps-script/guides/support/troubleshooting), if you are not familiar with it. If you have a unique question, you can post a new question. – Alan Wells Apr 26 '18 at 01:08
  • It now says that a project key is deprecated, is there a modern solution? – TankorSmash Jan 30 '19 at 19:20
  • From the Apps Script code editor, in "File -> Project Properties", it states: "Project key (Deprecated)" It has stated that for a long time. I don't know of any announced plan from Google for an alternative way to implement a library. I wouldn't worry about using the "Project key (Deprecated)" field for a library. Even though it states "Deprecated" it's not really deprecated for a library. – Alan Wells Jan 31 '19 at 01:20
  • "If you don't have an organization name, then create an organization " Why do we need to create an "organization"? Can't we publish Add Ons without "Organization"? – Naresh Aug 26 '20 at 12:39
  • If you don't have an Organization, then you will get an error. See StackOverflow post: [https://stackoverflow.com/questions/62719250/cannot-update-apps-on-google-marketplace-your-account-does-not-belong-to-the-s/62735887#62735887](https://stackoverflow.com/questions/62719250/cannot-update-apps-on-google-marketplace-your-account-does-not-belong-to-the-s/62735887#62735887) – Alan Wells Aug 26 '20 at 20:14
  • THANK YOU! Google's docs on this are terrible. The only thing I initially missed was the part about "Configure the Workspace Marketplace SDK" -- you do that by going through the "App Configuration" steps AND THEN the "Store Listing" steps (when the Marketplace SDK API is selected). – Ryan Feb 15 '22 at 23:19
1

By selecting Publish > Deploy as Spreadsheets Add-on under the Script Editor, will create a new item under the Chrome Web Store. This item will be linked to your CWS developer account, and you can publish the item as 'private', or as a draft available to testers, so that only people internal to your domain can access it.

Rivero
  • 911
  • 1
  • 6
  • 10
1

The upvoted answer is out of date. You can publish an add-on using G Suite Marketplace SDK which has its own "Integrate With Google" button in its configuration tab for local integration. See https://developers.google.com/gsuite/marketplace/sdk.

Google's help on the subject is decent enough, at https://developers.google.com/gsuite/add-ons/how-tos/publishing-editor-addons.