cloud platform project dialog box - google-apps-script

I'm doing the basic tutorial for google Quickstart bot in section to part 2 I see:
2) In the Cloud Platform project dialog box, click the URL for the project associated with the script.
I don't see any urls to click. Image of dialog box below

That's because since the release of April, 8th you can no longer view the default GCP assigned to your project (that is, if you created the project after the release). If properly reassigned a standard GCP, the link will appear in the dialog box in place of the This script has an Apps Script managed Cloud Platform project placeholder.
Please, read this official guide on how to switch to standard GCP (if you don't have a standard GCP yet, there is a guide on how to create one - btw, it might be confusing, but the button is clickable and will lead you straight to cloud console) and follow the steps provided.
Once done, copy the GCP number, open the resource manager again, paste the number and click on the "Set Project" button. If everything is configured correctly, you will see something like this and be able to access your new GCP:

Related

Document of developing data studio connector is almost out of date, how can I deploy the connector via the new editor?

The legacy apps script editor would be no longer available by September, and not all the functionality can be mapped to the new editor including "deployment by the manifest", which is necessary for deploying the connector of data studio. Updating the document at https://developers.google.com/datastudio/connector/deploy is necessary and must be hurry.
Does anyone know how to deploy or get the deployment id for data studio by the new apps script editor?
It took me a while to work this out as it's not intuitive nor documented, but there does seem to be a way if your manifest is set up correctly with the "dataStudio" object.
In the new editor, click the Deploy dropdown button. Then hit 'Test deployments' in the menu that displays. In the dialog box that opens, it should show 'Application(s): Data Studio' and to the right of that a button to 'Install'. Press that button and click Done.
Now press the Deploy dropdown button again and hit 'New deployment'. Now it should automatically set the deployment type to:
Add-on
Application(s): Data Studio
Just type in a description and press the 'Deploy' button and you are done.
In the project setting mark the following:

Google Apps Script - how to view HEAD Deployment ID / link?

I am not sure if this changed recently with the new IDE, but I thought that the deployment ID / URL of one's web app didn't change when one created additional versions. However, at this moment I am confused.
In my process.env, I have a link to my GAS URL which performs a doGet(e). However, when I go to manage deployments in my GAS file, I cannot find the corresponding deployment ID / link anywhere (not under Active nor Archived), yet, the code is working and reflects the latest changes in my script, so I believe it's the head deployment. Is this correct, or am I using some legacy deployment ID or something that's hidden?
Or perhaps asked differently, if I have the /macros/s/{deployment_id}/exec URL, is there a way within my Google account to find the corresponding script file and version / deployment?
Lastly, if the documentation recommends using versioned deployments, does this mean we have to update the GAS URL each time (e.g., if it's a public facing web app)?
Edit: others have encountered this: https://groups.google.com/g/google-apps-script-community/c/qhiqjGabQpI/m/q5i31yydCAAJ
To view the all deployment IDs, including HEAD (aka version 0):
Switch to Legacy Editor
Go to Publish => Deploy From Manifest
You'll get a list of deployment, with ID next to each one
Copy the ID of Version 0
Paste the ID in the corresponding Google Cloud Console => Configuration
Switch again to New Editor :)
If you are using Clasp with Apps Script for the development simply you can use clasp commands agents the given App Script Project.
clasp deployments to see the list of deployments including HEAD
this document maybe can help you.
Follow step 5 and step 6 in the IMPORTANT POINT.
5. Update the deployment as follows:
a. Open "New deployment" dialog with "Deploy" -> "Manage deployments".
b. For the 1st deployment, click the pencil icon for editing the deployment.
c. Set "version" as "New version".
d. When you want to change the description, please modify it.
e.Click "Deploy" button.
6.Testing
Please use above sample curl command. By this, you can confirm that sample2 is returned without changing the endpoint.
Answer:
There ways of viewing and editing deployments is set out in this article, which I will go through below. If you can not view the desired deployment using these methods, then I would urge you to contact Google Workspace support.
More Information:
As per the documentation on creating and managing deployments:
There are two types of deployments:
Head deployments, which are always synced to the current project code.
Versioned deployments, which are connected to a specific project version.
View versioned deployments
New editor:
To view the deployments of an Apps Script project, at the top, click Deploy > Manage deployments.
Find a deployment ID
New editor:
Open the Apps Script project.
At the top right, click Deploy > Manage deployments.
The deployment ID appears on the current deployment.
References:
Create and manage deployments | Apps Script | Google Developers

How do you restrict a Google App Maker application so that only users in a Google Group can access it?

I have built a Google App Maker application and published it. However, I only want users in a Google Group to be able to access the application (view UI elements) via the deployment link. How do you do this? I referenced this solution to another post: https://stackoverflow.com/a/49577258/9878092. I cannot seem to find where the Application access section that is mentioned in the solution is. Thank you!
Here are the steps you can follow to go to 'Application Access' screen.
From your appmaker window click on 'Setting' icon.
Go to Deployments tab.
Publish new deployment if you haven't done already. If you have already deployed your changes then click on the deployed version and "Edit" button.
This will open the Application Access screen. Select option "Only allow to specific" users. Provide user names who should be able to access the app.

Can't switch google cloud project on GAS Editor

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.

Unable to publish "Docs web addon"

We currently have a published docs web add on that was originally published in 2016. It looks like now add on's need to be attached to a GCP project. When I try to publish a new version I receive the following error : "API Console project with the id specified in the manifest's api_console_project_id field, does not have Google Apps Marketplace SDK enabled." See screenshot.
Error Message
Also, when I go into the script under resources there is no "Cloud Platform Project" link, see screenshot.
No menu option
Also, when I go under "Advanced Google Services" and click on "Google API Console" I get the following error screen when trying to load up the GCP Project.
I'm trying to keep this current listing as I already have a large user base, I just need to somehow associate a new GCP project with an existing add-on. Any help would be greatly appreciated.