How do I add another user to test my Google Workspace add-on for Google Sheets for testing prior to submission to the add-on marketplace? [duplicate] - google-apps-script

I'm currently developing a gmail add-on and am hoping to allow a few users internal to my team to test out the add-on prior to a public release. I was following the documentation here from google that states
You can allow other users to test the add-on by sharing the Apps Script project with their account (read access is required) and then prompting the users to follow the above steps.
I assume that 'read' access is equivalent to 'view' access, and have given a user 'view' access to the project.
The problem I'm running into is that even with 'view' permissions, users aren't able to do a test deployment and install the add-on to their gmail account. The blue 'Deploy' button simply isn't visible. Any ideas on how to get my add-on into a few users hands before publishing, but without giving them edit privileges?

One way to do it is to have the users copy your script and deploy it.
Another is to publish the Add-On privately and you would have control over what version of the Add-On your test users are seeing. For this your users should be of the same Google Workspace domain

Related

How to automatically load a google apps script menu on all user accounts?

I've searched around for this, but haven't found any info. I've written a few scripts that are bound to certain google docs/sheets. Instead of being bound to a particular doc/sheet, is it possible to have a google action script that loads whenever anyone in my google user account group opens a new or existing doc/sheet?
I know how to load a menu UI. That's simple. I know how to create a stand-alone script. I'm asking for something different. Basically, I want to create a deployment suite of proprietary scripts for our company, and whenever a current or future user of our group opens any new or current Google docs/sheets, the menu appears in their UI.
Is this possible, or do I have to ask my users to "install" my suite every time?
If this exists in GAS, I don't know where to look.
Since you mentioned that you want to have the script available as a "button" that can be accessible by any user from any Sheet or Doc I think the only way to do this is by deploying your script as an add-on then make it available internally through the Google Workspace Marketplace and do a domain installation of this add-on so it gets installed for all your users automatically.
First you would need to create the script and deploy it as an add-on. You can skip the part of the OAuth verification process because you are not publishing a public add-on but just an internal add-on for your organization.
After that make sure to add the Google Workspace Marketplace SDK to your Google Cloud Platform project. In the App configuration section from the Marketplace SDK set everything as internal/private and mark the Google services where you want it to be available and create the store listing.
Once you finish that you will see the app has been approved and an installation link. Make sure to install it domain wide and wait a couple of minutes for it to appear in all your files (from the selected Google services during the configuration) for all your users.
The result should look something like this:
References:
Create and manage deployments
Publish an app

Apps Script (Google Sheet) not allowing me to Run Script

I have a fairly simple dataset in a Google Sheet. I created an AutoSort script. I saved it, and when I click "Run," I get the following errors. One from a pop-up, and another from the Execution Log.
Pop-up error:
Authorization required
This project requires your permission to access your data.
*For this error, there is a button to "Review Permissions" and I log in using my google account and then just nothing happens.
Execution Log error:
Warning This project requires access to your Google Account to run. Please try again and allow it this time.
The Owner of this Google Sheet is my personal Gmail account, and I am making these edits and created the script using my business Gmail Admin account. I also tried to access this sheet and run the script USING my personal Gmail account, and received the same error:
Google hasn’t verified this app
The app is requesting access to sensitive info in your Google Account. Until the developer ({mypersonalemail}#gmail.com) verifies this app with Google, you shouldn't use it.
Any insight as to how I can authorize this would be appreciated. It sounds like something small I'm missing.
Also, in my personal email I receive a message with subject:
Review edits to your Apps Script project within your document
and it allows me links to access the worksheet and the script, but I don't see any way to approve the edits, or anything like that.
Expected behavior: What I am expecting is for the script to Run, when I click "Run."
It's not a good idea to mix accounts from different domains, specially when using a free account and a Google Workspace account like you have done because that is the cause of the situation that you are facing.
My hypothesis is that the Google Cloud default project linked to the bounded script is created with the account used to create the project.
If you need that you personal account be the spreadsheet owner the best is to create the script using the personal account, and when needed, create a Google Cloud Standard project (GCSP) using the the personal account. You might try to fix the problem with your spreadsheet and the current Apps Script project by creating a GCSP, as was mentioned previously, by using the account that is the owner of the spreadsheet and linking it to the Apps Script project.
Note: If your script is using sensitive scopes you might have to set the OAuth Consent Screen publishing status to tes and add your Google Workspace account as tester.
Ref: Setting up your OAuth consent screen
Once you have finished the setup of your Google Apps Script project you should be able to use your Google Workspace account to update and run the Apps Script code but any new deployment and new version should be done using your personal account.
If you have access to Shared Drives and are allowed to use them for your spreasheet, consider to move it to a Shared Drive as this will make a lot easier to manage your script.

How can I make a Google Docs Add-on for personal use without a Workspace subscription?

I don't want to share it with other users, it's just a personal productivity tool.
It seems my only option is to make it available to external users (internal users is reserved for Workspace accounts), but then I'm forced through the verification process.
I've tried using the "Test Deployment" function in the script editor, but I think that can only be used to test an Add-On that is bound to document. If the Apps Script project is unbound, the test deployment succeeds, but the Add-On doesn't appear in the menu.
I suspect this isn't possible, but I'd appreciate confirmation.

Publishing Add-ons for Domain-Wide Installation

I tried to Pre-install a Sheets add-on for all users in the domain.
For that purpose i referred to the steps provided here -> https://developers.google.com/apps-script/add-ons/domain-wide
The add-on was successfully published to all users.
But the users are not able to use the said Add-on in all the sheets.
When trying to run the add-on only the "Help" sub-menu item is visible under the Add-on Menu as shown in image given below.
The above mentioned problem only gets resolved when i follow the below mentioned steps:
Add-ons -> Manage add-ons... -> Click on "Manage" button for the said Add-on -> Select "Use in this document" option as shown in images given below.
The problem gets resolved if and only if the user follows above mentioned steps and then reloads the spreadsheet in the browser.
Also, these steps are needed to be performed again to enable the Add-on for that particular spreadsheet if the user creates a fresh spreadsheet.
This operation is not needed for any Add-on that is available on the Chrome Web store or from the G-Suite Marketplace.
Is there any way in which any Sheets Add-on created using Google Apps Script can be published for domain wide installation and pre-installed in all users accounts and is available to be used in any Spreadsheet without having to Manage that Add-on for use in that particular spreadsheet?
Thanks in advance.

Publish an add-on privately

I am trying to publish a test add-on with the option Private, because there is nothing new in this add-on, and would not be accepted by Google if I published it with Public.
The add-on contains a sidebar, a custom menu and a custom function. It works well on its Google Sheet.
In Chrome Web Store, I have added 2 gmails to Edit your tester accounts: under Your developer account. I also created a google group with these 2 gmails.
By following this thread, I did Publish ==> Deploy as Sheets web add-on..., then uploaded different icon and images in Chrome Web Store, paid 5 dollars, left most of boxes blank, then published it with the option Private and chose the created google group.
However, when I open a new Google Sheet with either of these two mails, I cannot find the add-on in Add-ons. By Add-ons ==> Get add-ons..., I cannot find the add-on either.
So does anyone know where this add-on is supposed to appear? Is it because this add-on is under review by Google that it is not available yet.
I am quite surprised to see such a basic publishing is not unclear. Is it because few people publish an add-on with Private?
In your web store dashboard, you should see the link to the add-on. Get the URL for this link and give the URL to the accounts you have created that should have permission. Those accounts need to install the add-on, and then should be able to use it.
I think you can also list your add-on as unlisted and not be required to go through the entire approval process. This makes it a little easier to share your add-ons with specific users.