What happened to the "Publish to Gallery" option in Google Apps Script? - google-apps-script

The Google Apps Script documentation claims:
"With the script loaded in the script editor click Publish > Publish to Gallery in the menu bar."
After starting a new script (for spreadsheets) project, I attempted to publish to the gallery. But there is no such option:
Was it recently removed? Do I need to change a setting somewhere?

I don't think it's available on Google Apps / business accounts. I've had to make a copy to a consumer account, then publish.

Related

Cannot find Google Apps Script written before Google Workspace Marketplace

I wrote an extension for Google Docs that used to show up in the Add Ons menu for my organization. The add on no longer shows up in the menu, but I can see it in the Google Workspace Market. I originally had it on the Google Chrome Webstore, but then it moved to the Workspace Marketplace. I can also see the corresponding project in my Google Cloud Platform console.
However, when I go to the Google Apps Script Editor, my project is not there. I have no access to the source code or ability to fix it so that it will show up in the Add Ons menu again. Does anyone know where I might be able to find script? I have the URLs for the Workspace Market, but it is private to my organization, so no one will be able to view it.
Also, I tried going through Google Support but they said that App Scripts is not supported and to ask on Stack Overflow.
Edit:
Screenshot of error
Answer to rev 1
Open the Google Marketplace SD settings page on the Google Cloud project linked of your add-on. There you should find the script project id.
Then on your web browser open your Google Apps Script project by writing a URL like this:
https://script.google.com/d/<<put-here-the-script-project-id>>/edit
If the above doesn't work, see notes at the bottom
Resources
Publish an add-on
Enable and configure the Google Workspace Marketplace SDK
Related
How can I view the source of a google apps script Library
Library with identifier underscoreGS is missing
NOTES
If you get the message "Sorry, unable to open the file at this time", try again using Chrome on incognito mode with all the extensions disabled and signing in only with an account that has access to the Google Apps Script project.
If the above doesn't work either, follow the screen advice, wait a bit and try later.
Related
Google Drive Page Not Found - Sorry, unable to open the file at this time

Publish an add-on from Standalone Google Apps script

I have developed a google sheet addon, I had succefully published that add-on from Google sheet bound script ie from tools->Script editor.
But If I made direct google apps script project(standalone project),I am unable to publish it,And a notification is popped up.
I research that I need it to setup it from google console,to publish standalone google app script to add-on ,But I don't found exact options to proceed.
The instruction is a very confusing for a first timer. Google keeps redirecting you to the page describing publishing editor addons, but what you really need is the page describing how to create a project on cloud platform.
https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project
Steps:
Create Project and get Project Number using instructions from link above
Go to you script. Select in the menu Resources > Cloud Platform projects... and enter your project number there
Then google will ask you to setup OAuth
After that, you can move your script to cloud platform and publish.
To publish an addon for G Suite Document editors follow the instructions here
https://developers.google.com/gsuite/add-ons/how-tos/publishing-editor-addons
The specific part about the GCP project is
Technical
The add-on script project must use a standard Cloud Platform (GCP) project. If the script project currently uses a default GCP project, you must switch to a standard GCP project. All collaborators working on the add-on should have access to the standard GCP project.

I've made a google apps script I want to share within my own domain but not publish to the web?

I've made a Google Apps Script project in one sheet that I want to easily access from multiple other Google Sheets, in Google Drive as well as Team Drive.
It would make no sense to publish this script to the Google Web Store since the functionality is based on our own files.
Can I publish it as an addon that's only accessible for users of my domain?
This should be possible by listing it as 'private' in the Developer Dashboard. In the script editor, go to Publish > Deploy as add-on. You have to follow the steps necessary to access the Developer Dashboard and create your listing.
Fill in all the details of your app (name, description, icon etc.) and set its visibility options at the bottom.

Custom Functions with add-ons?

I've been trying to create a Google Spreadsheet plugin from some existing Google App Scripts that I have, and one important part of this app script is Custom Functions.
Though the documentation for the add-ons doesn't indicate that this is supported, the documentation for Custom Functions does indicate that you can.
https://developers.google.com/apps-script/guides/sheets/functions
Through testing, I have not once been able to get Custom Functions exposed through a add-on. Does anyone know the secret sauce to get this to work?
Answer
According to Eric Koleda in [Code.gs - date_add_and_subtract]( https://github.com/google/google-apps-script-samples/blob/master/date_add_and_subtract/Code.gs) to make available the custom fuctions in an add-on it's required to include at least one add-on menu, but this is not working at this time on testing mode.
NOTE: The originally referred page was removed but the Date add and substract add-on sample code is available at https://github.com/googlesamples/apps-script/tree/master/sheets/dateAddAndSubtract.
The "solution" to test a custom function add-on is to publish the add-on privately so you could avoid the Google review of an untested add-on. Related Q&A: Publish an add-on privately
NOTES:
You have to create a Google Cloud Project, set OAuth Consent Screen, add the Google Workspaces Marketplace SDK, complete the configuration page, the listing page and to publish the add-on
Setting the OAuth Consent Screen for Internal Use requires to a Google Workspace Account
Setting the OAuth Consent Screen for External Use limited to test account only doesn't allow to publish the add-on to the GW Marketplace.
One scenario is to use different Google Cloud Projects for testing and production but use the same Google Apps Script project. Another scenario is to have two different Google Apps Script projects each one with their own Google Apps Project and someway copy the code from one to the other i.e. using Google Apps Script GitHub Assistant Chrome Extension, CLASP or the Google Apps Script API.
Remarks
There are a couple of related GAS issues, please star them:
"Test as add-on" from standalone project to Google Sheets doesn't link custom functions
After activating an add-on, custom functions get stuck Loading... until spreadsheet refresh

Cannot start publishing my Google App Script as Add-on

I have created a Google App Script, which is bound to Document. But now I need to publish this script as an Add-on for our domain.
In order to publish the add-on, I have read the documentation below:
https://developers.google.com/apps-script/add-ons/publish#development_checklist
As described in this article, I registered a version of my script through "Manage Version".
But when I go to the "Publish" menu of the script editor, I only have the option "Deploy as web-app". I do not see any menu item "Deploy as add-on".
How can I start the publishing process for my App Script?
Before you can publish an add-on you must go through the application and review process:
https://developers.google.com/apps-script/add-ons/publish#apply_to_publish
The "Deploy as add-on" option will only appear after you are approved.
To deploy your add-on, you have to first get approval from the Apps Script Advisor. To do this you have to go to:
The Publishing Documentation
Then you have to fill out the Google Form there.
Hope this helps!
Notice: It might take a few weeks before they respond back to you!
The reason you are not able to see that "Deploy as add-on" option because, you might be opening the normal Apps script console(script.google.com).
But if you want to publish your script code as an add-on, you have to open the script editor from the Doc or sheet which is bound to the script.
Open the Doc, Tools--> Script editor.
Then go to Publish, now you can see an option for "Deploy as add-on".
Hope that helps!