সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
কর্ম প্রতিক্রিয়া
ক্লায়েন্টের উপর এক বা একাধিক ক্রিয়া সম্পাদন করার জন্য একটি কলব্যাক ফাংশন (যেমন, একটি ফর্ম প্রতিক্রিয়া হ্যান্ডলার) থেকে প্রতিক্রিয়া বস্তুটি ফেরত দেওয়া যেতে পারে। কর্মের কিছু সমন্বয় সমর্থিত নয়।
// 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"]],["2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003e\u003ccode\u003eActionResponse\u003c/code\u003e enables callback functions to trigger actions like opening links, displaying notifications, and navigating between cards within Google Workspace add-ons.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use \u003ccode\u003eActionResponseBuilder\u003c/code\u003e methods to define these actions and control client-side behavior based on user interactions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eprintJson()\u003c/code\u003e method helps with debugging by providing the JSON representation of the \u003ccode\u003eActionResponse\u003c/code\u003e object.\u003c/p\u003e\n"]]],["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"],null,["ActionResponse\n\nThe response object that may be returned from a callback function (e.g., a form response handler)\nto perform one or more actions on the client. Some combinations of actions are not supported.\n\n```javascript\n// An action that opens a link\nconst actionResponse =\n CardService.newActionResponseBuilder()\n .setOpenLink(CardService.newOpenLink().setUrl('https://www.google.com'))\n .build();\n\n// An action that shows a notification.\nconst notificationActionResponse = CardService.newActionResponseBuilder()\n .setNotification(\n CardService.newNotification().setText(\n 'Some info to display to user'),\n )\n .build();\n\n// An action that shows an additional card. It also sets a flag to indicate that\n// the original state data has changed.\n\nconst cardBuilder = CardService.newCardBuilder();\n// Build card ...\nconst navigationActionResponse = CardService.newActionResponseBuilder()\n .setNavigation(CardService.newNavigation().pushCard(\n cardBuilder.build()))\n .setStateChanged(true)\n .build();\n``` \n\nMethods\n\n| Method | Return type | Brief description |\n|-----------------------------|-------------|------------------------------------------------|\n| [printJson()](#printJson()) | `String` | Prints the JSON representation of this object. |\n\nDetailed documentation \n\n`print``Json()` \nPrints the JSON representation of this object. This is for debugging only.\n\nReturn\n\n\n`String`"]]