Gmail Add-on trigger criteria

后端 未结 2 490
夕颜
夕颜 2020-12-11 14:42

Can someone accurately describe the trigger criteria for Gmail Add-on scripts? Apparently, the trigger is not invoked each time the user navigates between Gmail conversation

相关标签:
2条回答
  • 2020-12-11 15:31

    you can use ActionResponseBuilder.setStateChanged(), to clear the cache

    link: https://developers.google.com/gmail/add-ons/how-tos/interactions

    0 讨论(0)
  • 2020-12-11 15:32

    Currently, Google Apps Script doesn't have triggers for Gmail events so the trigger will not invoke every time, the user navigates to a different Gmail conversation. Whenever a new message open it will invoke trigger, contextual trigger. You can also tryout time-driven trigger which invokes after each time interval. To use time-driven trigger open your project on https://script.google.com/. In Apps Script Editor, navigate to Edit -> All your triggers. If there is no trigger then setUp one and Save. See this example Create Time-driven trigger in Gmail-add on

    Refer this link for more information How do I detect when I view an email in gmail with google-apps-script script? I think this might be helpful.

    0 讨论(0)
提交回复
热议问题