简体   繁体   English

如何通过google-apps-script脚本检测我在gmail中查看电子邮件的时间?

[英]How do I detect when I view an email in gmail with google-apps-script script?

I'd like to trigger a script every time I view an email in gmail. 每当我在gmail中查看电子邮件时,我都想触发一个脚本。 Does anyone know if there a trigger for detecting this which i can bind to? 有谁知道是否有触发器来检测我可以绑定到哪个?

I'm open to doing this with any platform, not just google-apps-script. 我愿意在任何平台上执行此操作,而不仅仅是google-apps-script。

Short answer 简短的回答

At this time Google Apps Script doesn't have a triggers for Gmail events. 目前,Google Apps脚本没有Gmail事件的触发器。

Explanation 说明

On Google Apps Script there are three kinds of scripts, bounded, stand-alone and web apps, and two kinds of triggers, simple and installable 在Google Apps脚本上,有三种脚本,有界,独立和网络应用,以及两种触发器,简单且可安装

Scripts only could be bounded to documents, forms and spreadsheets. 脚本只能绑定到文档,表单和电子表格。

The available simple triggers are: 可用的简单触发器是:

  • onOpen(e) 1,2,3 onOpen(e) 1,2,3
  • onEdit(e) 2 onEdit(e) 2
  • onInstall(e) 4 onInstall(e) 4
  • doGet(e) 5 doGet(e) 5
  • doPost(e) 5 doPost(e) 5

The available installable triggers are: 可用的可安装触发器是:

  • Time-driven triggers 时间驱动的触发器
  • Google Apps triggers Google Apps触发器
    • on open 1,2,3 1,2,3开放
    • on edit 2 在编辑2
    • on change 2 在改变2
    • on submit form 2,3 提交表格2,3

Triggers by app 按应用触发

The triggers works on the following "environments": 触发器适用于以下“环境”:

  1. Google Documents editor Google文档编辑器
  2. Google Sheets editor Google表格编辑器
  3. Google Forms editor Google表单编辑器
  4. Add-ons 附加组件
  5. Web Apps 网络应用

Note: There are no simple nor installable that works on the Google Forms Viewer (response submission). 注意:Google Forms Viewer(响应提交)上没有简单的或可安装的。

References 参考

暂无
暂无

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

相关问题 如何检测Google日历活动何时以google-apps-script脚本开头? - how can i detect when a google calendar event starts with google-apps-script script? 如何恢复已撤销的 google-apps-script 权限? - How do I restore revoked permissions on a google-apps-script? 我无法通过 google-apps-script 代码发送 Gmail - I cannot send Gmail by google-apps-script code 如何在google-apps-script中解决此“任务”? - How do I fix this “assignment” in google-apps-script? 使用google-apps-script,在处理资源日历的事件时如何获取日历名称? - Using google-apps-script, how do I grab the calendar name when going through events of a resource calendar? 如何在google-apps-script中使用动态变量创建QUERY函数 - How do I make a QUERY function with a dynamic variable inside of my google-apps-script 如何使用google-apps-script制作媒体推文? - How do i make a media tweet using google-apps-script? 如何停止在已暂停的Google Apps帐户上运行google-apps-script? - How can I stop a google-apps-script from running on a suspended Google Apps account? 我从 google-apps-script 收到服务器错误,我该如何找出是什么原因造成的? - I'm recieving a server error from google-apps-script, how do I figure out what is causing it? 如何在我的笑话测试中模拟 google-apps-script 接口,例如 Logger/DataStudio? - How can I mock the google-apps-script interfaces, such as Logger/DataStudio, in my jest tests?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM