Class ActionStatus
Stay organized with collections
Save and categorize content based on your preferences.
ActionStatus
A class that represents the status for a request to either invoke or submit a dialog.
Only available for Google Chat apps. Not available for Google Workspace add-ons.
const actionStatus = CardService.newActionStatus()
.setStatusCode(CardService.Status.OK)
.setUserFacingMessage('Success');
Detailed documentation
setStatusCode(statusCode)
Represents the status for a request to either open or submit a dialog.
const actionStatus = CardService.newActionStatus().setStatusCode(
CardService.Status.OK,
);
Parameters
Name | Type | Description |
statusCode | Status | The status code. |
Return
ActionStatus
— This object, for chaining.
setUserFacingMessage(message)
The message to send users about the status of their request. If unset, a generic message based
on the Status
is sent.
const actionStatus =
CardService.newActionStatus().setUserFacingMessage('Success');
Parameters
Name | Type | Description |
message | String | The message to send. |
Return
ActionStatus
— This object, for chaining.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-30 UTC.
[null,null,["Last updated 2025-01-30 UTC."],[[["\u003cp\u003e\u003ccode\u003eActionStatus\u003c/code\u003e is a class used in Google Chat apps to represent the status of dialog requests, such as opening or submitting a dialog.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods like \u003ccode\u003esetStatusCode\u003c/code\u003e to indicate the request's success or failure and \u003ccode\u003esetUserFacingMessage\u003c/code\u003e to display a custom message to the user.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use this class to provide feedback to users about their interactions with dialogs within Google Chat apps.\u003c/p\u003e\n"],["\u003cp\u003eThis class is exclusively for Google Chat apps and isn't available for Google Workspace Add-ons.\u003c/p\u003e\n"]]],[],null,["# Class ActionStatus\n\nActionStatus\n\nA class that represents the status for a request to either invoke or submit a dialog.\n\nOnly available for Google Chat apps. Not available for Google Workspace add-ons.\n\n```javascript\nconst actionStatus = CardService.newActionStatus()\n .setStatusCode(CardService.Status.OK)\n .setUserFacingMessage('Success');\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|----------------------------------------------------------------|-------------------|------------------------------------------------------------------------|\n| [setStatusCode(statusCode)](#setStatusCode(Status)) | [ActionStatus](#) | Represents the status for a request to either open or submit a dialog. |\n| [setUserFacingMessage(message)](#setUserFacingMessage(String)) | [ActionStatus](#) | The message to send users about the status of their request. |\n\nDetailed documentation\n----------------------\n\n### `set``Status``Code(statusCode)`\n\nRepresents the status for a request to either open or submit a dialog.\n\n```javascript\nconst actionStatus = CardService.newActionStatus().setStatusCode(\n CardService.Status.OK,\n);\n```\n\n#### Parameters\n\n| Name | Type | Description |\n|----------------|------------------------------------------------------|------------------|\n| `status``Code` | [Status](/apps-script/reference/card-service/status) | The status code. |\n\n#### Return\n\n\n[ActionStatus](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `set``User``Facing``Message(message)`\n\nThe message to send users about the status of their request. If unset, a generic message based\non the `Status` is sent.\n\n```javascript\nconst actionStatus =\n CardService.newActionStatus().setUserFacingMessage('Success');\n```\n\n#### Parameters\n\n| Name | Type | Description |\n|-----------|----------|----------------------|\n| `message` | `String` | The message to send. |\n\n#### Return\n\n\n[ActionStatus](#) --- This object, for chaining."]]