gpt4 book ai didi

google-apps-script - 如何公开分发Google Apps脚本(处理Gmail邮件)?

转载 作者:行者123 更新时间:2023-12-04 03:41:14 25 4
gpt4 key购买 nike

我开发了一个Google Apps Script来自动处理一些电子邮件(连接到Gmail),或多或少像一个机器人,并且按预期工作。它使用Time-driven触发器Minutes timer > Every minute每分钟运行一次:

enter image description here

是否可以将该“脚本”分发给其他用户(包括商业用户),还是必须开源? (注意:Google Apps脚本内部使用Javascript)

我看到了Deploy as web appDeploy as API executableRegister in Chrome Web StoreDeploy as web add-onDeploy from manifest,但是我不知道该使用哪个为其他用户提供此服务。

enter image description here

此外,它是否一定要存在于Chrome网上应用店中,或者是否有其他方法可以通过商业方式分发/授予客户对此类应用程序的访问权限?

TL; DR:如何将处理Gmail电子邮件的Google Apps脚本分发给客户? (需要每分钟自动运行)。

注意:Gmail附加组件似乎在这里可用:https://gsuite.google.com/marketplace/category/works-with-gmail。但是似乎我们不能以商业方式出售附加组件。 Gmail附加组件一定是免费的吗?

enter image description here

注意:该脚本未链接到精确的浏览器或计算机(因此无法在特定计算机上使用浏览器扩展程序安装该脚本),该脚本每分钟都会在Gmail服务器上安静地运行。

最佳答案

部分答案:

关于Gmail附加组件的Restrictions页面指出,他们没有提供直接向用户收费以安装附加组件的方式:

We don't provide a way to charge users for installing add-ons, and add-ons can't include ads. However, you can roll your own payment system or call into an existing billing database. Your add-on can connect to non-Google services that bill users.



但是,对于我来说,尚不清楚是否可以通过Gmail插件运行时间驱动的后台任务(假设每15分钟执行一次)。一方面,我在“限制”页面中看到:

You can't create or use Apps Script simple or installable triggers in a Gmail add-on.



并且时间驱动的触发器似乎包含在“简单”或“可安装”类别中,但是我不确定。例如, everyMinutes(n) :

Specifies to run the trigger every n minutes. n must be 1, 5, 10, 15 or 30.

ScriptApp.newTrigger("myFunction")
.timeBased()
.everyMinutes(10)
.create();


另一方面,我看到了一个带有所谓的 Universal Actions的示例 here:
/**
* Run background tasks, none of which should alter the UI.
* Also records the time of sync in the script properties.
*
* @param {Object} e an event object
*/
function runBackgroundSync(e) {
...

关于google-apps-script - 如何公开分发Google Apps脚本(处理Gmail邮件)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50427467/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com