// An action that opens a link
const actionResponse =
CardService.newActionResponseBuilder()
.setOpenLink(CardService.newOpenLink().setUrl('https://www.google.com'))
.build();
// An action that shows a notification.
const notificationActionResponse = CardService.newActionResponseBuilder()
.setNotification(
CardService.newNotification().setText(
'Some info to display to user'),
)
.build();
// An action that shows an additional card. It also sets a flag to indicate that
// the original state data has changed.
const cardBuilder = CardService.newCardBuilder();
// Build card ...
const navigationActionResponse = CardService.newActionResponseBuilder()
.setNavigation(CardService.newNavigation().pushCard(
cardBuilder.build()))
.setStateChanged(true)
.build();
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-12-02 (世界標準時間)。"],[[["`ActionResponse` enables callback functions to trigger actions like opening links, displaying notifications, and navigating between cards within Google Workspace add-ons."],["Developers can use `ActionResponseBuilder` methods to define these actions and control client-side behavior based on user interactions."],["The `printJson()` method helps with debugging by providing the JSON representation of the `ActionResponse` object."]]],[]]