Class ActionStatus

  • The ActionStatus class represents the status for a request to invoke or submit a dialog in Google Chat apps.

  • It is only available for Google Chat apps and not for Google Workspace add-ons.

  • Key methods include setStatusCode() to set the status code and setUserFacingMessage() to set a user-facing message about the request status.

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.

constactionStatus=CardService.newActionStatus()
.setStatusCode(CardService.Status.OK)
.setUserFacingMessage('Success');

Methods

MethodReturn typeBrief description
setStatusCode(statusCode) ActionStatus Represents the status for a request to either open or submit a dialog.
setUserFacingMessage(message) ActionStatus 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.

constactionStatus=CardService.newActionStatus().setStatusCode(
CardService.Status.OK,
);

Parameters

NameTypeDescription
statusCodeStatus 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.

constactionStatus=
CardService.newActionStatus().setUserFacingMessage('Success');

Parameters

NameTypeDescription
messageStringThe 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年12月03日 UTC.