View Source GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action (google_api_chat v0.34.3)
An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. Google Workspace Add-ons and Chat apps:
Attributes
-
function
(type:String.t
, default:nil
) - A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see Read form data. -
interaction
(type:String.t
, default:nil
) - Optional. Required when opening a dialog. What to do in response to an interaction with a user, such as a user clicking a button in a card message. If unspecified, the app responds by executing anaction
—like opening a link or running a function—as normal. By specifying aninteraction
, the app can respond in special interactive ways. For example, by settinginteraction
toOPEN_DIALOG
, the app can open a dialog. When specified, a loading indicator isn't shown. If specified for an add-on, the entire card is stripped and nothing is shown in the client. Google Chat apps: -
loadIndicator
(type:String.t
, default:nil
) - Specifies the loading indicator that the action displays while making the call to the action. -
parameters
(type:list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1ActionParameter.t)
, default:nil
) - List of action parameters. -
persistValues
(type:boolean()
, default:nil
) - Indicates whether form values persist after the action. The default value isfalse
. Iftrue
, form values remain after the action is triggered. To let the user make changes while the action is being processed, setLoadIndicator
toNONE
. For card messages in Chat apps, you must also set the action'sResponseType
toUPDATE_MESSAGE
and use the samecard_id
from the card that contained the action. Iffalse
, the form values are cleared when the action is triggered. To prevent the user from making changes while the action is being processed, setLoadIndicator
toSPINNER
.
Summary
Functions
Unwrap a decoded JSON object into its complex fields.
Types
@type t() :: %GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action{ function: String.t() | nil, interaction: String.t() | nil, loadIndicator: String.t() | nil, parameters: [GoogleApi.Chat.V1.Model.GoogleAppsCardV1ActionParameter.t()] | nil, persistValues: boolean() | nil }
Functions
Unwrap a decoded JSON object into its complex fields.