简体   繁体   English

如何轻松发布加载项以避免对复制的电子表格进行重新授权请求?

[英]How to easily publish add-on to avoid re-authorization request for a copied Spreadsheet?

I have created a Google Sheet that uses some very simple lines of script (made with Tools --> Script editor inside the Sheet).我创建了一个 Google Sheet,它使用了一些非常简单的脚本行(使用工具 --> 工作表内的脚本编辑器制作)。 The script only adds simple functionalities, eg to click some buttons or extract the Sheet's filename.该脚本仅添加了简单的功能,例如单击某些按钮或提取工作表的文件名。 Now, the workflow in my company is to make a copy of the main Sheet, and work in the copied version.现在,我公司的工作流程是制作主 Sheet 的副本,并在复制的版本中工作。 However, when I call the script in the copied version (eg by clicking a button) each time an authorization request is shown.但是,每次显示授权请求时,当我调用复制版本中的脚本时(例如,通过单击按钮)。 I want to avoid this request.我想避免这个要求。 Only 1 user needs the funcionality.只有 1 个用户需要该功能。

I know that this problem can be solved by publishing my script as an add-on (see How to avoid re-authorization request for a copied Google Spreadsheet + script ).我知道这个问题可以通过将我的脚本发布为附加组件来解决(请参阅如何避免对复制的 Google 电子表格 + 脚本的重新授权请求)。 When publishing the script I am prompted to create a "User-managed Cloud Platform project".发布脚本时,系统会提示我创建一个“用户管理的云平台项目”。 Tried this, but I have zero experience with cloud platform projects, OAuth, JavaScript or whatsoever.尝试过这个,但我对云平台项目、OAuth、JavaScript 或任何其他项目的经验为零。

Is there any tutorial or simple explanation available for publishing an add-on to solve this (relatively simple) problem?是否有任何教程或简单的解释可用于发布附加组件来解决这个(相对简单的)问题? Or should I not even try without any experience?或者我什至不应该在没有任何经验的情况下尝试? Help is much appreciated!非常感谢帮助!

To create a Cloud project you just have to go to https://console.developers.google.com -> click create project -> Fill the project info and click in create button [1].要创建 Cloud 项目,您只需转到https://console.developers.google.com -> 单击创建项目 -> 填写项目信息并单击创建按钮 [1]。 The add-on can help you with your simple problem if you install the add-on for the entire domain so the add-on will be automatically installed in the Spreadsheet App without the need of the authorization request.如果您为整个域安装加载项,加载项可以帮助您解决简单的问题,因此加载项将自动安装在电子表格应用程序中,而无需授权请求。 Here you have some documentation on how to publish your add-on [2][3] and install it for domain-wide [4].这里有一些关于如何发布附加组件 [2][3] 并在域范围内安装它的文档 [4]。

[1] https://cloud.google.com/resource-manager/docs/creating-managing-projects [1] https://cloud.google.com/resource-manager/docs/creating-managing-projects

[2] https://developers.google.com/gsuite/add-ons/how-tos/publishing-editor-addons [2] https://developers.google.com/gsuite/add-ons/how-tos/publishing-editor-addons

[3] https://ctrlq.org/google.apps.script/docs/add-ons/domain-wide.html [3] https://ctrlq.org/google.apps.script/docs/add-ons/domain-wide.html

[4] https://support.google.com/a/answer/172482 [4] https://support.google.com/a/answer/172482

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM