रिस्पॉन्स ऑब्जेक्ट, जिसे क्लाइंट पर एक या उससे ज़्यादा कार्रवाइयां करने के लिए, कॉलबैक फ़ंक्शन (उदाहरण के लिए, फ़ॉर्म रिस्पॉन्स हैंडलर) से दिखाया जा सकता है. कार्रवाइयों के कुछ कॉम्बिनेशन काम नहीं करते.
// An action that opens a linkconstactionResponse=CardService.newActionResponseBuilder().setOpenLink(CardService.newOpenLink().setUrl('https://www.google.com')).build();// An action that shows a notification.constnotificationActionResponse=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.constcardBuilder=CardService.newCardBuilder();// Build card ...constnavigationActionResponse=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-22 (UTC) को अपडेट किया गया."],[[["`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."]]],["The `ActionResponse` object enables client-side actions from callback functions. It supports actions like opening a link, displaying a notification, or showing a new card. `setOpenLink` opens a specified URL, `setNotification` displays text to the user, and `setNavigation` pushes a new card. `setStateChanged` indicates changes in original data. `printJson()` provides a JSON representation of the object for debugging. Certain action combinations may be unsupported.\n"]]