So following this tutorial I am attempting to extend by adding the add-on via the sidebar. [See the screen shot below] []2
But I am getting this error when attempting to add this auth scope.
Error: invalid_scope
Some requested scopes were invalid. {valid=
[https://www.googleapis.com/auth/gmail.addons.current.message.readonly,
https://www.googleapis.com/auth/script.locale, https://www.googleapis.com/auth/spreadsheets.readonly,
https://www.googleapis.com/auth/gmail.addons.current.action.compose,
https://www.googleapis.com/auth/calendar.addons.execute,
https://www.googleapis.com/auth/drive.addons.metadata.readonly,
https://www.googleapis.com/auth/calendar.readonly,
https://www.googleapis.com/auth/gmail.addons.execute], invalid=
[https://www.googleapis.com/auth/spreadsheets.addons.execute]}
My question is do I need this https://www.googleapis.com/auth/spreadsheets.addons.execute for sheets to see the homepage triggers in my manifest? If not what am I overlooking?
UPDATE
We now have support for Workspace Add-ons in Google Sheets, Google Docs and Google Slides (though it may not be available in all regions as yet)...Google Forms is not yet supported.
What you want to do is not possible as you can only create Editor Add-ons for Google Sheets not GSuite Add-ons.
There are distinct differences between the two.
GSuite Add-ons are currently only applicable to:
Gmail
Google Drive
Google Calendar
Editor Add-ons are currently only applicable to:
Google Sheets
Google Forms
Google Docs
Google Slides
See add-on types documentation for clarification.
Actually you're experiencing this issue because the feature hasn't rolled out yet to your account.
It appears this is a Google Workspace account so you need to navigate to https://admin.google.com/ac/accountsettings/preferences
And select "New Feature"
Then you must select "Rapid Release" and the new Google Workspace add-on feature will be enabled for you probably within 15 minutes but it can take up to 24 hours.
I was experiencing this same issue and once I added this it worked fine.
Also, there isn't an auth scope of https://www.googleapis.com/auth/spreadsheets.addons.execute
You need to simply add https://www.googleapis.com/auth/spreadsheets
and it will work perfectly. Good luck!
Related
I am develloping a Google Apps Script based Workspace add-on.
I am trying to figure out how to edit the AUTHORIZE ACCESS button to match Google's Sign-In Branding Guidelines.
I've searched high and low and don't see anything that talks about how to edit the sign-in experience for add-ons.
The branding guidelines apply to buttons that you create yourself.
The AUTHORIZE ACCESS button under the text
Would you like to give this add-on access to your account?
This add-on would like to show additional information in Gmail, but it needs approval to access your Google account.
is a standard Google interface that typically appears when you test an Add-on deploying it from the Apps Script editor
The above mentioned screen cannot be modified in any way, since it is being generated by Google.
In any case, when an Addon is installed from Google Marketplace, opposed to being tested locally, the authorization prompt will occur in a pop-up window during the installation process, rather than within the sidebar of the Add-on.
I have a published Editor Add-on for Google Sheets. It is deployed via the Sheets Add-on section within the App Configuration page of the Google Workplace Marketplace service on GCP.
I have been thinking about moving it to a Workspace Add-on in order to make use of the Card functionality. However, I haven't been able to confirm that the latter is actually able to use custom functions. For example, https://developers.google.com/apps-script/add-ons/concepts/types says:
Each Editor Add-on type (for example, Sheets add-ons) can have its own set of type-specific capabilities, restrictions, and special considerations. When building Editor Add-ons, it's important to understand these Editor-specific details
And going to the Sheets page, mentions custom functions. It also doesn't help that there seems to be no way to actually test the custom functions are working via either method of testing due to https://issuetracker.google.com/issues/36763437 without having a published Editor Add-on. So I haven't been able to confirm this way either.
Are Google Workspace Add-on a replacement to the current Editor Add-on? I.e. can I check/use the Google Workspace Add-on option and uncheck the Sheets Add-on? Or do I need to use both, the Workspace Add-on for the Card feature and Editor Add-on for custom functions?
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
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
The new Google Spreadsheets have add-ons like Google Analytics. They can generate an report using the GA API.
Now I need to programmatically trigger this add-on function. However the add-on is not a script with functions, but a black box it seems. There are scheduleable triggers to run my own defined functions, but I see no way to talk to the add-on and start the "get data" function it provides to the user (within the Spreadsheet UI).
Is there any way to run the add-on on a scheduled basis?
Unfortunately, I don't think so.
If methods in an add-on could be called programmatically, that add-on would be published as a Library. I did some digging and found the key of the Google Analytics add-on ("M6DHyOggPdtxTHKxmzonxqGg3No8Xsi1r"), tried to add it, and got the error:
A workaround might be to programmatically emulate a click on the appropriate menu item, but I don't believe that is currently supported by Apps Scripts.
You can't do this with the Google Analytics add-on. But the Supermetrics add-on also connects to Google Analytics and can be set to refresh with time-based triggers: https://chrome.google.com/webstore/detail/supermetrics/bnkdidgbiidpnohlnhmkehlimlnfhgce