Transferring advanced service permission onto copy of a Google Apps Script project - api

I have a Google Sheet that I am using as a template. This sheet contains a script that uses an advanced service. However when I take a copy of the sheet the contained script no longer has permissions to access the advanced service in the dev console (it is "on" in "Advanced Google Service" list).
How can I ensure that the copy of the template sheet also has permission to access the advanced service without having to manually enable it in every copy?
I did find this way of enabling APIs in the dev console programatically from Spencer but I still get the same error about needing to enable the API in the dev console.
I can kind of get it to work by moving the Tasks API functionality into an add-on as it uses the add-ons console project. But that doesn't quite fit with what I'm trying to do.

Related

How to deploy an update to an already released Google Workspace Addon?

I have a functioning Google Sheets Add-on that is listed in the Google Workspace Marketplace. I've made changes in the new Apps Script Editor and tested them locally, now I want to push them to my users.
The process as I understand it, to press "New Deployment"
add a description and press "deploy"
after which I copy the "Deployment ID" into the Google Workspace Marketplace SDK page,
and hit SAVE in the bottom.
It's been a few hours and I still cannot see it being live.
Is there a review process for updates like this? Or am I missing a step?
The previous version is still being served to users as far as I can tell.
Update in response to the comment from #ziganotschka
I am making a Google Sheets Editor Addon, and I'm only now understanding the difference between that and the Google Workspace Addon. I've resubmitted my store listing for review with Google Workspace Addon disabled, and removed the "Common" part of my manifest. I've updated the "version" number to correspond to the latest deployment.
Is it not possible to test a Sheets Editor Addon from the new editor without deploying it as a Workspace Addon? And should updating the version number be sufficient to roll out an update?
From the question
Is it not possible to test a Sheets Editor Addon from the new editor without deploying it as a Workspace Addon?
It depends on what kind of test do you want to do, if your Apps Script project is bounded or a standalone project and what do you Editor add-on does and how it does that.
I.E. you might test a simple edit trigger (onEdit) by using a function for mocking the edit event object and passing it to the onEdit function. To be clear this doesn't need to create a new version and for testing and add-on it's not necessary to make a new deployment.
And should updating the version number be sufficient to roll out an update?
It depends on if the Cloud project OAuth consent screen was set for external use or for internal use, in the new version requires new scopes.
Let say that you fixed typo on a variable name, in this case only creating a new version and adding the version number to the add-on configuration page will be enough, but if you added a sensitive API and you add-on is set for external use, then you will have to update the OAuth consent screen and wait for Google review and approval.

serve oracle service cloud Customer portal locally?

I am working on customizing the oracle service cloud customer portal, but since OSvC provides only WebDAV to connect to it. It is very time-consuming to edit files and then upload them to WebDAV even for a single word change.
I am looking for a solution to serve it locally make desired changes and then upload the desired code to webDEV.
But after searching the file structure I can not make which framework it uses, I tried to use websites like https://builtwith.com/ and WhatRuns but they are also not able to find anything useful.
Although after searching in the file structure, I find some files of CodeIgnitor but the structure is way more different than the CodeIgnitor folder structure.
The short answer is no, you will not be able to run Customer Portal locally. While it is a fork of CodeIgniter from many years ago, there are server-side dependencies that will prevent you from running it in a local sandbox.
That said, it is possible to automate many of the manual tasks of interacting with WebDAV for change testing. If you edit locally, then you can use scripting hooks or event RPA robots to automate some of the manual file movement. Personally I have a flow to edit remotely in my test environment with an editor (like VSCode or Nova) that can connect to a remote server via WebDAV and edit files directly in the development area of a site. Then, when finished, I have a script that pulls down the latest version of all files and then allows me to commit changes to Git for SCM.
Another option is RPA. You can develop a robot that can be run to automate the manual tasks that you face in your workflow. Personally, I think that scripting is a better solution than RPA since you can automate all of the actions via scripting or a shell. But, it's another option to consider.
Another way of "Live editing" the OSvC CP code is to connect to WebDav via a software that supports it like Mountain Duck which uploads your code to OSvC on save.
OR use the better solution Windows Explorer which supports connecting to WebDav and treating it like a network drive, by going on My Computer -> Computer -> Map Network Drive then put https://yoursite.custhelp.com/dav/cp click Next then you'll be promoted to login using your OSvC login.

AdWords Reports into BigQuery

I try to use an AdWords script to Export AdWords Reports into BigQuery -
I have BigQuery project with enabled BigQuery API: http://prntscr.com/g8peb5
And I use correct Project ID in the script: http://prntscr.com/g8peup
But when I try to run the script, I encounter an error:
"Access Not Configured. BigQuery API has not been used in project
333669768108 before or it is disabled. Enable it by visiting
console.developers.google
com/apis/api/bigquery.googleapis.com/overview?project=333669768108
then retry. If you enabled this API recently, wait a few minutes for
the action to propagate to our systems and retry. (line 135)"
The fact is that I do not have a project with a similar ID (333669768108) and the link provided does not work correctly.
Why can there be such a problem?
Thanks in advance
I ran into a similar problem. I couldn't find a way to let the AdWords Script using BQ API run under an existing project in the Google Developer Console. Somehow AdWords needs to create a separate project for each script using Advanced Google Services. I had a similar issue as well with Gmail API in a script tied to Google Sheets workbook.
I am not sure what you mean with the link from the log not working correctly. Do you get a message like this one when you open it?
The API "bigquery.googleapis.com" doesn't exist or you don't have permission to access it
If so, you can just click on 'Library' in the panel on the left-hand side, and activate BigQuery API from there. When you run the script next time, it should push the data to BigQuery without any problems (assuming the script is correct).

Is there a way to programmatically determine the Enabled APIs for a Google Apps Script

For a Google Apps Script that I am working on, I need to enable Google URL Shortener API and Google Drive API.
The trouble comes when I create a copy of the existing Spreadsheet which has a Script attached to it; (everything working the way I want it but I want a copy.)
Now when I create a copy of the Spreadsheet, its associated Script files also get copied - but what does not seem to be copied over are the enable/disable status of various APIs.
The new copy seems to take on default permissions and only default APIs seem to be enabled.
I would not know if the script has required APIs enabled or not. Only when I try to run it, it would throw up an error and crash.
I would like to programmatically know this and take action when a copy of the spreadsheet is made.
I have done several searches for this but could not find any relevant results hence asking this question here.
Specifically more annoying is the fact that the URL Shortener API and even Drive API have to be enabled in two steps - which includes logging into Developer Console.
If I distribute this tool then they would be forced to go into Source Code and from the code editor forced to enable the APIs.
Please help.

Move Access Web Database to Another Sharepoint Site

I have an Access web database (the out-of-the-box Project one) and plan to move to another Sharepoint site (a test server). I have done lots of googling and nothing comes up. Any pointers will be greatly appreciated.
Thanks.
After some trials and errors, I figured out how to do that. First open the Access web db in Access client. Then go to Publish & Save, where you should see an option Save As Local Database. Then open the local database, again go to Publish & Save, you can choose to Publish to Access Services. A pane will appear to let you enter the URL of Sharepoint server and site name. If you have customizations or lots of lookups, there's a good possibility it will not publish. If that's the case, you just need to fix all the errors reported.
I was able to move my Access 2016 app to a new Sharepoint Site by saving it as a .app and uploading it to the new site.
I found this link to Microsoft's site helpful: Create an Access app package