【发布时间】:2020-06-16 11:18:04
【问题描述】:
在过去的 24 小时内,我运行的以前工作的 GMail 插件开始出现故障。
我把它一直剥离到只试图从docs 工作中获取示例:
var action = CardService.newAction().setFunctionName('composeEmailCallback');
CardService.newTextButton()
.setText('Compose Email')
.setComposeAction(action, CardService.ComposedEmailType.REPLY_AS_DRAFT);
// ...
function composeEmailCallback() {
var thread = GmailApp.getThreadById(e.threadId);
var draft = thread.createDraftReply('This is a reply');
return CardService.newComposeActionResponseBuilder()
.setGmailDraft(draft)
.build();
}
在 BUILD 上(不是按下按钮),以前工作的 GMail 插件会显示错误消息:
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: "...(omitted)"
}
}
这是一个新的已知问题吗?谁有一些故障排除步骤可以分享?
【问题讨论】:
标签: google-apps-script gmail google-apps