(如何)我可以在整个组织范围内发布Google表格和相关的Google Apps脚本,并避免或取消授权提示? [英] (How) can I publish a Google Sheet and associated Google Apps Script organization-wide and avoid or suppress authorization prompts?

查看:56
本文介绍了(如何)我可以在整个组织范围内发布Google表格和相关的Google Apps脚本,并避免或取消授权提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的组织使用Google Apps for Work.我们有一个Google表格表单"供员工/用户填写.输入信息后,用户应使用电子邮件作为附件/PDF.最后,用户单击页面底部附近的按钮",该按钮触发脚本清除用户数据.用户第一次单击该按钮时,会出现需要授权"提示,通知用户应用程序"(脚本)需要运行授权".如果获得批准,则提示将继续请求该脚本的在Google云端硬盘中查看和管理电子表格权限.

Our organization uses Google Apps for Work. We have a Google Sheet "form" for employees/users to complete. After entering information, users are expected to use email as attachment/PDF. Finally, users click a "button" near the bottom of the sheet that triggers a script to clear user data. The first time a user clicks the button, an "Authorization Required" prompt appears, informing the user "the application" (script) "needs authorization to run." If approved, the prompt goes on to request View and manage your spreadsheets in Google Drive permissions for the script.

是否可以为Google Apps组织中的所有用户进行数字签名或以其他方式预先批准G​​oogle Apps脚本,从而不会出现此提示?我们可以/将包括针对用户的说明,以避开问题/减轻恐惧,但是我们的许多用户会忽略或不理解说明并感到困惑.

Is it possible to digitally sign or otherwise pre-approve a Google Apps Script for all users in a Google Apps organization so this prompt doesn't appear? We can/will include instructions for users, to head off questions / allay fear, but many of our users will either ignore or not understand the instructions and be perplexed.

我愿意(并探索)其他解决方案(Google表单/表格?),但更愿意尽可能地呆在(本机)Google Apps环境中.

I'm open to (and exploring) other options for tackling this (Google Forms/Sheets?), but prefer to stay in the (native) Google Apps environment as much as possible.

我在其他地方找不到这个问题,据我所知,它在Google Apps脚本文档中没有得到回答.

I couldn't find this question elsewhere and as best as I can tell, it isn't answered in Google Apps Script documentation.

推荐答案

我发现没有预先为每个帐户/组织手动批准组织/团体/个人的方法.

I have found no way to pre-approve an organization/group/individual without manually doing it for each account.

您可以使用服务帐户部署脚本,并使该脚本作为该帐户运行.然后,您将授权该帐户,而最终用户的帐户将不起作用.缺点是,如果您希望使用最终用户的电子邮件发送电子邮件,则不会发生.另外,电子邮件的发送必须来自应用程序中的代码.这意味着所有电子邮件都将使用服务帐户的电子邮件地址发送出去. (尽管我现在想知道是否可以在不发送电子邮件的情况下启动电子邮件.基本上就像单击了mailto链接一样将其弹出.)

You CAN deploy the script using a service account and have it run as that account. Then you are authorizing that account and the end user's accounts do not come into play. The drawback is that if you want the emails to go out using the end user's email, it won't happen. Plus the sending of the email would have to be from code in the app. That means all emails would go out using the service account's email address. (Although I am now wondering if it is possible to initiate the email without sending it. Basically pop it up as if a mailto link was clicked.)

您也将无法获得最终用户的名称等.如果这些项目不重要,或者您可以信任它们在可能需要的地方填写其名称(可以将从名称"更改为它们的名称).键),然后以服务帐户的身份运行即可.

You also will not be able to get the end user's name, etc. If these items are not important, or you can trust them to fill out their name where it may be needed (you could change the From name to what they key in) then running as the service account may work for you.

卡尔

这篇关于(如何)我可以在整个组织范围内发布Google表格和相关的Google Apps脚本,并避免或取消授权提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆