I've got some Google Sheet script code that I'd like to extract into Google Sheet Addon to be published for just of our domain (not public web). Individuals on my team have been able to do this successfully in the past but after 1/25/2019 when Google removed Add-Ons from Google Chrome Store we've been having difficulties.
I am trying to follow:
https://developers.google.com/gsuite/add-ons/how-tos/publish-addons#publishing_instructions
But get the following error when trying to configure the G Suite Marketplace API:
Project Key is not associated with current project or the script version doesn't exist.
I am pulling the project Key from File --> Project Properties:
Does anyone have any idea where I am going wrong or know of good tutorial of how to publish a private Google Sheet Add-on?
I had the same problem but identified a solution as follows.
In the Google Apps Script Editor, under Resources -> Cloud Platform Project, click the ProjectName - project-id-xxxxxxxxxxxxxxxxxxx link. Then when it opens your Cloud Platform Project, in the upper left corner, your project name will be listed with a dropdown. Click the dropdown and verify that this project-id-xxxxxxxxxxxxxxxxxxx matches the link you clicked. The two numbers did not in my case and I had to refresh my screen for the correct project-id to show up in the Cloud Platform Project screen.
Don't know if this will help, but I was having the same error message and I just got it to work. I put in the value from File --> Project Properties: ->Project key (Deprecated) and still got the error. Then I changed the version to the number of my latest version and it worked.
Double check your version number - while in the script editor, click on 'File' and 'Project Properties'. I had the same problem. It turns out my error was entering the version name I had given my current version of the script (3.0), instead of the number Google had assigned to the current version of my script (3).
Once I entered '3' as the version number, I no longer got the error message "Project Key is not associated with current project or the script version doesn't exist ", and I was able to save.
I used the 'Project key (Deprecated)'.
The Project key has been deprecated. Try using the Script Id instead.
Related
I am trying to update a Google Sheets Addon.
I currently face 2 problems:
the new Script Editor does not know anything about versions (so I used the legacy editor and created a new version there)
when I want to deploy the changes (via the G Suite Marketplace SDK) I get an "Project Key is not associated with the current project or the script version doesn't exist." error when I enter the new version.
What should I do?
We have just rolled back to a previous version, can you refresh and try again? Please let me know how it goes.
I tried to change the version of my gmail addon before submitting it but I keep getting this error Failed to get details of the deployment ID.
Steps that I've done:
I managed to add a version to the submit form
My submission got rejected
I made some changes to the addon's code
I tried to change the addon's deployment ID to the new version but I got this error instead
This kind of error usually appears in case of a wrong Deployment ID
Common causes are e.g. spaces introduced before or after the Id.
Another possibility is that the Apps Script project is bound, while for a Google Workspace Add-on it needs to be a standalone script.
It is also possible that MarketSpace SDK does not find the script because the owner of the GCP project and the Apps Script file are not the same person.
While the following behavior would result in a different error than yours - for completion sake:
You also need to make sure that the Apps Script is tied to a Standard GCP project - namely the one to which the Add-On belongs, and that it is the only Apps Script project bound to this GCP project
I'm trying to publish a Gmail Addon. I'm following guide here:
https://developers.google.com/gmail/add-ons/how-tos/publish
but each time I click save in " Apps Marketplace SDK " configuration page I get the error in the title:
"Deployment Id is not associated with current project."
That's nonsense, since the associated project has been created directly with an action triggered from https://script.google.com
I have even tried to manually create a new project, and to associate the script to the new project, operation that succeeded but the save configuration fails at the same point with the same error.
Any idea?
Are you trying to use the HEAD deployment ID? If so then that's the problem.
I had this problem, it turned out the script was not properly linked to the google cloud project. You can find instructions on doing that here
https://tanaikech.github.io/2019/07/05/linking-cloud-platform-project-to-google-apps-script-project/
I am trying to publish a spreadsheet web add-on but getting following error.
There is no API Console project with the id specified in the
manifest's api_console_project_id field
Can anyone tell me why I am getting this error ?
Gosh... not sure why this was so hard.
If Google are reading this: it'd be more user-friendly to run the various API checks before the user selects to publish their add-on and/or provide a link to the correct documentation! Then fix that super cryptic error message.
Anyway, if you are stuck with this error, this is what you need to do. (Thanks Tanya Gupta for putting me on the right track).
Step 1: Enable the GSuite Marketplace SDK
Follow these steps:
From the Script Editor, open the Resources menu item then select Cloud Platform Project
Click the button View API Console (you can also click the link with your project ID)
Click the hamburger (navigation) icon on the top left and select "APIs & Services" then "Library"
Search for "GSuite Marketplace SDK". It's important you install the SDK (software development kit) not the API.
Click the ENABLE button
You should now be able to see an option for Configuration in the menu on the left.
Step 2: Configure the GSuite Marketplace SDK
For configuration you will need to:
select at least one language and enter an application description (for your add-on). The name should be pre-filled and match your script name.
upload some icons of various sizes
add a Terms of Service URL (I initially used a public Google Doc for my T&Cs but this would not pass the new OAuth client requirements which require a verified domain. If you don't have a verified domain then users will see a security warning when installing your add-on. You - apparently - can use Github pages but please don't quote me on that.)
enable at least one Add-on extension
When you enable the Add-on extension, you will need to provide the following information:
Add-on Script Project Key can be found from the Script Editor. Go to File > Project Properties and copy the value for Project key (Deprecated)
Add-on Script Version is the version of your script. You can find the version in the Script Editor. Go to File > Manage Versions and select the latest version of your script.
Note: your add-on script version will be updated automatically when you publish new releases of your add-on.
Google documentation:
https://developers.google.com/gsuite/add-ons/how-tos/publish-for-domains#before_you_publish
Just to build on Dagmar's Answer
Solve this issue in 8 steps with Pictures:
On Apps Script Menu Bar, go to Resources > Cloud Platform project...
On Google Cloud Platform, go to the left navigation menu Select APIs & Services > Library
In the search bar that appears, type in "GSuite Marketplace SDK" Hit Search, once it appears click it.
Click on "ENABLE"
Once you click Enable in step 4. the screen below should appear. Select "CONFIGURATION"
Fill the document as you deem fit, but the most important part is shown below.
Scroll Down to Editor Add-on extensions, then select the Google App you're building your add-on for. It's the same process for Docs, Forms Sheets or Slides Add-ons
How to Get Script Project Key. Go back to your Apps Script Page.
Go to File > Project properties. Select the 'Info' tab. Then copy the value of Project key (Deprecated) and paste into the "Script Project Key" field
How to Get Script Version. Still on your Apps Script Page.
Go to File > Manage versions....
Then copy the value of Version and paste into the "Script Version" field
Click Save Changes and voila you're done. Do not forget to add the privacy policy URL and other required info, else the changes will not be saved
If you are publishing on Google Apps Marketplace, you need to not only enable the API, you also need to configure it by entering the needed settings.
1) First click on the enabled API as per image below:
2) Then click on configuration.
3) Then fill out the values as per below:
4) Particularly important are (not shown here):
a) including correct oauth scopes (File->Project Prop->Scope from your script file)
b) Docs Add On Project Key (File->Project Properties->Info->Project key)
c) Docs Add On Script Version (from the developer console)
Now if you go back and publish you should no longer have the error
I have an add-on for Google Sheets that's currently being tested within my domain. For this post, let's call it My First Add On. When users install the add-on they're prompted for permissions, but it always appears as "Untitled project" in the dialog box:
The project name is set to My First Add On everywhere I can find:
The Google Apps script project name
The Google Cloud Platform project name (IAM > Settings)
The Google Chrome Web Store add-on name (Developer Dashboard)
My add-on is published with 'private' visibility, available only to people in a given Google Group (my trusted testers).
I've searched through documentation and forums to see what I'm missing here, but can't find anything that covers this scenario.
This has to be something basic, but I'm completely stuck and the only support option available to me is to post here. I'd be grateful for any help, folks!
I've seen something similar, where the name of the script isn't updated if you test it before saving the name (ie, create a name when prompted rather than before testing). Try clearing your cache, closing out of the tab, etc, and then launching again. I'm not sure it's something you can fix in code or listings anywhere.