// A button that opens as a link in an overlay and
// requires a reload when closed.
var button = CardService.newTextButton()
.setText("This button opens a link in an overlay window")
.setOpenLink(CardService.newOpenLink()
.setUrl("https://www.google.com")
.setOpenAs(CardService.OpenAs.OVERLAY)
.setOnClose(CardService.OnClose.RELOAD_ADD_ON));
// An action response that opens a link in full screen and
// requires no action when closed.
var actionResponse = CardService.newActionResponseBuilder()
.setOpenLink(CardService.newOpenLink()
.setUrl("https://www.google.com")
.setOpenAs(CardService.OpenAs.FULL_SIZE)
.setOnClose(CardService.OnClose.NOTHING))
.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-08-21 UTC。"],[[["`OpenLink` allows Google Workspace Add-ons and Google Chat apps to open specified URLs with customizable behaviors."],["Developers can set how the link opens (overlay or full-screen) and the action taken when it's closed (reload add-on or do nothing)."],["The `OpenLink` object provides methods like `setOnClose`, `setOpenAs`, and `setUrl` for configuration."],["When using `setOnClose` to reload add-ons, avoid links with Cross-Origin-Opener-Policy (COOP) enabled for proper functionality."]]],[]]