简体   繁体   English

Google Apps脚本附加组件:可安装的触发器限制

[英]Google Apps Script add-ons: Installable trigger limitations

I'm looking to build an add-on that allows the user to backup data from a third-party API. 我正在寻找一个允许用户从第三方API备份数据的加载项。

The idea is that the user submits a sidebar form with some parameters required for the API, then the add-on creates a time-driven trigger that retrieves the data and outputs it to a user-specified spreadsheet. 其想法是,用户提交带有API所需的一些参数的侧边栏表单,然后该附加组件创建一个时间驱动的触发器,该触发器检索数据并将其输出到用户指定的电子表格。

The developer docs mention "Each add-on can only have one trigger of each type, per user, per document.". 开发人员文档提到“每个用户每个文档每个附件只能有一个触发器。” I'm curious to know if a user can add multiple "backup" triggers via the same add-on, as long as each trigger outputs data to a unique spreadsheet. 我很想知道用户是否可以通过相同的插件添加多个“备份”触发器,只要每个触发器将数据输出到唯一的电子表格即可。

For example, the user installs the add-on in Spreadsheet A. He/She creates a backup trigger which outputs data in Spreadsheet B, then creates another backup trigger (such as one with different parameters) which outputs data in Spreadsheet C. Spreadsheet B and C do not have the add-on installed. 例如,用户在电子表格A中安装了插件。他/她创建了一个备份触发器,该触发器在电子表格B中输出数据,然后创建了另一个备份触发器(例如具有不同参数的一个触发器),在电子表格C中输出数据。和C没有安装附加组件。

Is the scenario in the example possible? 示例中的方案是否可能? Or does the user need to install the add-on for each spreadsheet in order to have multiple backup triggers active? 还是用户需要为每个电子表格安装插件才能激活多个备份触发器?

Thanks! 谢谢!

If I understand this right, these are 3 different spreadsheets and not 3 different sheets within the same one. 如果我理解这项权利,那么这些是3个不同的电子表格,而不是同一张中的3个不同的工作表。 Also, since you mentioned that the data being backed up from B to C has different parameters than the data being passed from A to B, you will need to install the trigger on both A and B. And since no data is being passed on from C, you don't require the add-on for a backup trigger there. 另外,由于您提到从B备份到C的数据与从A传递到B的数据具有不同的参数,因此您将需要在A和B上都安装触发器。并且由于没有数据从A传递到B C,您不需要那里的触发器触发插件。 Reason being that a trigger installed on A will not be able to access data on B, filter it according to a different set of parameters and pass it on to C. Hence, B will require to have the add-on to set-up a separate trigger altogether. 原因是安装在A上的触发器将无法访问B上的数据,无法根据一组不同的参数对其进行过滤,然后将其传递给C。因此,B将需要具有附加组件才能设置a完全分开触发。 Hope this helps! 希望这可以帮助!

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

相关问题 如何解决Google App脚本中插件的时间触发限制? - How to get around time trigger limitations for Add-Ons in Google App Script? 如何在Google表单中使用应用程序脚本或加载项 - How to use apps script or add-ons in Google Forms 发布Google Apps脚本附件的生命周期? - Lifecycle of publish Google Apps Script Add-ons? 可以从单个 GCP 项目发布多个 Google Apps 脚本编辑器插件吗? - Multiple Google Apps Script editor Add-ons can be published from a single GCP project? 进行更改后,Google Apps 脚本附加组件不会更新部署 - Google Apps Script Add-Ons not update deployments after make change 将应用程序脚本发布到附加组件后出现 Oauth 2.0 问题 - Oauth 2.0 problem after publish apps script to add-ons 为每个编辑器自定义应用程序脚本加载项菜单 - Customizing the apps script add-ons menu for each editor GMail Google Apps Script Plugin“Apps Script 返回的值具有附加组件平台无法使用的类型” - GMail Google Apps Script Plugin "The value returned from Apps Script has a type that cannot be used by the add-ons platform" 使用插件或Google扩展程序在Google脚本中打印 - Print in google script using add-ons or Google extensions 本地化 Google 插件 - Localizing Google Add-ons
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM