jky*_*dav 5 google-apps-script google-apps-script-addon gmail-addons
我正在尝试将部分小部件动态添加到newSelectionInput OnChangeAction(已添加卡)上的Card / CardService中。
我没有在Google上看到任何文档,如何实现此行为。
有人可以指导我找到正确的文档或如何执行此操作。
谢谢
小智 -1
我们可以从卡中添加/删除已经内置在输入字段的 onchange 操作中的部分。
function getCard(addSection) {
// this is your function to build the card. The initial "getCard" function call does not have any parameter passed, so it will be treated as "false". Hence no section will be added
addSection = addSection || false;
if(addSection) {
// add your section here
}
.....
return card;
}
function OnChangeAction() {
var card = getCard(true);
return CardService.newActionResponseBuilder().setNavigation(CardService.newNavigation().updateCard(card)).build()
}Run Code Online (Sandbox Code Playgroud)
我希望这能解决您的问题。
| 归档时间: |
|
| 查看次数: |
953 次 |
| 最近记录: |