Status Update
Comments
su...@gmail.com <su...@gmail.com> #2
Create a new project with the above code snippet.
Associate the project with a GCP project that has 'Google Drive API' disabled.
Run the script.
jo...@google.com <jo...@google.com> #3
Hello,
Google Apps Script built-in or advanced services consume an API meaning that the Service in question should be enabled in order to use it. By default Google Apps Script uses a GCP project which requests your permission to activate this service on your behalf. As you stated, this only happens when you don't have the Drive API enabled, as stated in our
Let me know if you have further questions.
Thanks!
[Deleted User] <[Deleted User]> #4
Thanks for clarifying!
Shall we take the oppurtunity to update the documentation to reflect what you mentioned more explicitly? The docs only mention that an API should be anabled for "advanced services", not for all integrations. It would also be nice to have a map of all services and the APIs that require enabling for the integration to work.
Description
Hi Google AppScript Support person,
This morning I had a perfectly working script that searches through google sheets by iterating over all files in the Google Drive of the executing user.
However, after switching the associated Google Cloud Project, I started seeing the mysterious error "Something Went Wrong - Please reload the page to try again".
I was able to narrow it down to a script that just runs
This script, when created on a new AppScript project (with the "default" GCP project), runs fine. However, when I associate the script with any GCP project that does not have the Google Drive API enabled, I get the above error.
What steps will reproduce the problem?
This took quite a while to debug mostly due to the lack of information in the error or logs, along with the unclear documentation.
The former complaint, about the clarity of the error is, I think, a source of frustration in the community, as I've seen quite a few posts from people getting stumped by this error (I answered one of the questions with my solution here:https://stackoverflow.com/a/69596292/484127 ).
The latter, on the documentation, is quite possibly a bug in the docs, as under Advanced services - requirements section it's stated:
However, what is unclear is why some of the DriveApp functions are also considered to be "Advanced service" even though the reference does not mention this.
I'm certain we can work togethe to help some of the other people who experience this issue. Please ping me if you have any asks.
Thanks, Pavel