I am not able to switch google cloud platform project in GAS editor.
What I am doing is…
Open the google sheet GAS editor
Open Resource --> Cloud Platform Project
Enter project number that I want to connect
With the process above, I was able to switch a cloud platform project but now it returns an error
‘Project does not exist, or you need edit access to it.’
I am using the same cloud project and same account(editor) that I used before and properly worked. I tried do the same with a owner account, but it didn’t work, either.
Also, this cloud project is not a default project nor a hidden project. (If it does, I guess it should not be able to access through GAS editor from the beginning)
I have checked documentation below, but it tells me only case when switching to a hidden project.
https://developers.google.com/apps-script/guides/cloud-platform-projects
Does anyone have a solution or suggestion??
Thank you for the help in advance.
Problem Solved.
I figured out that OAuth IDs which are generated when make connection docs to the cloud project are not be deleted even though delete actual document files.
What I have done is...
Login Google Cloud Platform
Go to APIs&Services --> Credentials
On OAuth 2.0 client IDs, delete unnecessary contents from the list
Back to your docs and switch the cloud project.
Related
I have spent a lot of times creating a project in https://console.cloud.google.com, enabling the Drive API, creating server account credentials, and finally writing a small NodeJS integration allowing me to read and write files to Google Drive.
My intent is to be able to store files (organized in folders) on Google Drive from my server, and see them in the classic Google Drive desktop app with my Google account to check everything is fine.
My project seems correctly setup and I was able to create files from my NodeJS program (the files exist, I can list them with the same program), but I can't see the files anywhere in Google Drive with my Google account, with which I created the project.
I was expecting this to be extremely simple. That I would have a out of the box Drive UI allowing me to review the changes.
In the documentation they say I can configure a UI integration but I don't know if this is what I am looking for or not. It seems complicated, talking about my "app" etc, while I just want a simple Google Drive UI for it !
Could anyone help me understand all this ?
Thanks
Before I start, I'm having the same issue as this question and this question. Unfortunately, neither of those solutions is working for me.
I have an add-on in the G Suite Marketplace. There are two separate entries, one for a Docs version and one for a Slides version. Now that the Chrome web store is being phased out for add-ons, I want to combine them into the same listing (afaik, that wasn't possible in the web store, only G Suite Marketplace).
Because of this, I now need to associate the Apps Script projects for both the Docs and Slides version with the same Cloud project. I'm hoping to migrate both to the Docs version because that has more users so hopefully fewer people will be impacted by the move.
I've taken the following steps:
Duplicate the Slides Apps Script project (to avoid messing with the original Marketplace listing until everything is set)
Go into the Cloud Platform settings for the new Slides App Script project
Enter the Cloud Platform project number for the Docs add-on
When I do this, I get an error that says "Project does not exist or you need edit access to it."
The weird thing is that if I try these steps to switch both projects to the Slides version in the Marketplace, it works. Because of this, I'm assuming there's some issue with the Cloud Platform project for the Docs version, but I can't seem to figure out what it is. Does anyone have any tips for common settings that could cause this error?
I was having the same problem and found out that it has something to do with the Shared Drive you have for a team.
Using the answer found by Ian: Google Apps Script cannot convert from GAS managed to specific Cloud Project
If the project is in a Shared Google Drive, like a team drive, you are no longer the owner (even if it says you are).
I couldn't create a new project in a shared drive and convert it to a Cloud Managed Project.
The only way I could do it was to create a new project on my account, in My Drive, and convert that to a Cloud Managed Project, THEN move it to the shared drive. (Once it is in a shared drive, you can't MOVE it back out.) However, if it is a Cloud Managed Project, you can add more scopes to the project after it is in the shared drive. - Once this new project is setup, then copy over your code for your old copy, and point all links to the new one.
I'm developing some automation/integration between a CRM software and my google account. I am attempting to use the Google Apps Script API so I can remotely execute functions in Google Apps Script through the integration I'm building from within the CRM software.
The only problem is, when attempting to run a function which calls a GAS function through the API, I get the following error:
"Apps Script API has not been used in project project number before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/script.googleapis.com/overview?project=103424032563 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
This would normally be no problem, as I would simply access the GCP portal through the link and enable the GAS API, but when I try to access my project, I don't have access at all, and get the "failed to load data" error.
Further complicating my issue, GCP support will not help because they suspect I am a hacker trying to obtain access to a project that, for all they know, isn't mine.
And because I cannot access this project to authorize the API, I also cannot associate my google script with the same project, as this is a requirement for the Google Apps Script API to function.
I suspect it's the CRM software piece in which I'm developing this integration that is causing this error, (somehow the GCP project is being created by a different user,) but they haven't been all that helpful in determining what's going on.
Have any of you had a similar situation? And, if so, how did you approach solving it?
Further complicating my issue, GCP support will not help because they
suspect I am a hacker trying to obtain access to a project that, for
all they know, isn't mine.
Google Support does not refuse to help. They don't accuse you of being a hacker. Google Support can look at the project and see if you have credentials in the project and if you do they can explain how to authorize yourself. However, Google Support requires a support agreement, which is not free. If you do not have one, then you are not entitled to technical support only billing support. Look up your billing account ID and send a request for billing support. Your billing account will also show you which projects are linked to your billing account.
The issue is that you are trying to access the wrong Project ID. Figure out what is the correct Project ID. If you have the Cloud SDK installed execute this command gcloud projects list and this will tell you which projects your credentials have access to.
We are no longer able to associate our Apps Script projects with our Cloud platform project. When going to Resources: Cloud platform project in the GAS editor, and entering the project ID, it says "Project doesn't exist or you need Edit access to it.". The project definitely exists and the same Google account is an owner of it. With the same workflow, we previously managed to associate many projects.
Is there maybe a limit on how many GAS projects can be associated with one Cloud project? We've associated about two dozen recently, and then it started to produce this error. Or what could be going on?
This is explained in details here:
https://developers.google.com/apps-script/guides/cloud-platform-projects
Specifically, quoting:
"There may be cases in which you want multiple Apps Script projects to share the same Google Cloud Platform project. Since these default Cloud Platform projects for Apps Scripts are hidden, they cannot be used as the destination projects for a switch. If you see a "Project does not exist or you need edit access to it" error when attempting to switch a script's project, that usually means you are attempting to move it to one of these default projects.
To get around this restriction, create a new, blank Cloud Platform project, and use the steps above to add each script to that."
I was able to solve this by switching from the Classic Editor to the New Editor, adding the Cloud Project, then reverting back to the Classic Editor (if needed).
I found plenty of questions regarding this issues, but no one answer that could solve my problem.
I have a project in Apps Script, which I deployed as API executable. I enabled Google App Script Execution API. I made OAuth 2.0 Client ID on developer console. I made everything step-by-step as described here: https://developers.google.com/apps-script/guides/rest/api
Then I try to execute code from Google API Explorer: https://developers.google.com/apis-explorer/#p/script/v1/
I fill in request body properly, fill in script id (take it from "File > Project properties" from App Script editor), but what I get is "Permission denied":
Well, I tried to do the same from PyCharm (Python). I fully followed the following instruction: https://developers.google.com/apps-script/guides/rest/quickstart/python
Guess, what I got... The same error!
The Apps Script project is saved in my corporate Google Drive. The scopes of the project are: https://www.google.com/calendar/feeds https://www.googleapis.com/auth/script.external_request , which I filled in correctly in Python and shouldn't fill in in API Explorer.
Many users recommend to check if the project is correctly associated with a project on Google Cloud Platform. When I try to change project, I get error: "The project number should not match." Probably because it is associated correctly...
I almost lost my hope... Again, I saw a lot of answers to this issue across StackExchange forums, but no one could have solved this problem.
One more note: I didn't sign up for the Google Cloud Platform (I don't have a work account there, although it sees my projects and I could have generated OAuth2 2.0 Client ID and API key.
Well, I deleted my python project along with the .credentials file and recreated the project - then it worked. So probably it didn't work, because I missed one of described steps at the first execution of the code and after I fulfilled all the requirements I went on using old creds.
So for all who faces the same problem:
Do everything what is described in the Google documentation and my question.
If you missed something, delete the .credentials file and run the code again. Then it should work.