Class ActionStatus

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');

Methods

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

NameTypeDescription
statusCodeStatusThe 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

NameTypeDescription
messageStringThe message to send.

Return

ActionStatus — This object, for chaining.