在卡更新Google脚本上显示通知

问题描述

如何使通知显示在卡负载上?

在文档中,我发现:https://developers.google.com/apps-script/reference/card-service/notification?hl=en

但是我不确定如何根据自己的情况正确使用它。

想要的结果

当用户单击按钮时,将通过CardService.newNavigation().updateCard(card)更新卡,并且一旦更新卡,就会显示通知。

修改

当我尝试退回以某些数据[card,notification]的形式获取某些数据和通知的卡时,将发生显示的错误。当我只返回上述之一时,它会按预期工作。

以下显示错误。

The value returned from Apps Script has a type that cannot be used by the add-ons platform. Also make sure to call build on any builder before returning it. Value:values {
  proto_value {
    type_url: "type.googleapis.com/caribou.api.proto.addons.templates.publicapi.ContextualAddOnMarkup.Card"
    value: "\n\017\n\rVyber projekt\022\375\001\022\372\001B\367\001\n\020dropdown_project\020\003\032\017\n\aVyberte\020\001\032\002-1\032\023\n\005Await\020\000\032\b105966.0\032!\n\024\342\233\265\357\270\217 Freelo addons\020\000\032\a31512.0\032\031\n\vgmail addon\020\000\032\b104757.0\032\020\n\002ll\020\000\032\b105967.0\032\022\n\004test\020\000\032\b104596.0\032\023\n\005test2\020\000\032\b104741.0\032\022\n\004null\020\000\032\b105969.0\032\022\n\004null\020\000\032\b105968.0\"\021\n\rshowToDoLists \000*\aProjekt\022G\022+\")\n\'\n\021Vytvo\305\231it Projekt\022\022\022\020\n\016newProjectForm\022\030\"\026\n\024\n\006Logout\022\n\022\b\n\006logOut\"\fprojectsCard"
  }
}
values {
  proto_value {
    type_url: "type.googleapis.com/caribou.api.proto.addons.templates.publicapi.SubmitFormResponseMarkup"
    value: "\022\027\022\025Projekt byl vytvo\305\231en"
  }
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)