AI-generated Key Takeaways
-
ActionStatus
is a class used in Google Chat apps to represent the status of dialog requests, such as opening or submitting a dialog. -
It provides methods like
setStatusCode
to indicate the request's success or failure andsetUserFacingMessage
to display a custom message to the user. -
Developers can use this class to provide feedback to users about their interactions with dialogs within Google Chat apps.
-
This class is exclusively for Google Chat apps and isn't available for Google Workspace Add-ons.
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');
Methods
Method | Return type | Brief description |
---|---|---|
set | Action | Represents the status for a request to either open or submit a dialog. |
set | Action | The message to send users about the status of their request. |
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 |
---|---|---|
status | Status | The status code. |
Return
Action
— 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
Action
— This object, for chaining.