如何检测何时在Gmail中使用google-apps-script脚本查看电子邮件? [英] How do I detect when I view an email in gmail with google-apps-script script?

查看:131
本文介绍了如何检测何时在Gmail中使用google-apps-script脚本查看电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我在Gmail中查看电子邮件时,我都想触发一个脚本。有没有人知道是否有触发器检测到我可以绑定?



我打算在任何平台上执行此操作,而不仅仅是google-apps-script。 现在Google Apps脚本不会' t有触发Gmail事件的触发器。

说明



在Google Apps脚本中,有三种脚本,有限的,独立的和网络应用程序,以及两种触发器,简单的和可安装的

脚本只能绑定到文档,表单和电子表格。 b
$ b

可用的简单触发器是:


  • onOpen(e) 1,2,3 (e) 2

  • onInstall(e) 4

  • doGet(e) 5

  • doPost(e) 5


    可用的可安装触发器为:


    • 时间驱动触发器

    • Google在编辑上打开 1,2,3

    • ,应用程序触发


      • 2

      • 更改 2

      • 提交表单 2,3






    按应用触发



    这些触发器适用于以下环境:


    1. Google文档编辑器

    2. Google表格编辑器

    3. Google表格编辑器

    4. 附加组件
    5. 网络应用

    注意:Google表单浏览器中没有简单或可安装的功能(响应提交)。



    参考文献




    I'd like to trigger a script every time I view an email in 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.

    解决方案

    Short answer

    At this time Google Apps Script doesn't have a triggers for Gmail events.

    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

    Scripts only could be bounded to documents, forms and spreadsheets.

    The available simple triggers are:

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

    The available installable triggers are:

    • Time-driven triggers
    • Google Apps triggers
      • on open1,2,3
      • on edit2
      • on change2
      • on submit form2,3

    Triggers by app

    The triggers works on the following "environments":

    1. Google Documents editor
    2. Google Sheets editor
    3. Google Forms editor
    4. Add-ons
    5. Web Apps

    Note: There are no simple nor installable that works on the Google Forms Viewer (response submission).

    References

    这篇关于如何检测何时在Gmail中使用google-apps-script脚本查看电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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