Note: The following fields are mutually exclusive:action,open_link,open_dynamic_link_action,card. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive:action,open_link,open_dynamic_link_action,card. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive:action,open_link,open_dynamic_link_action,card. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive:card,action,open_link,open_dynamic_link_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive:card,action,open_link,open_dynamic_link_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive:card,action,open_link,open_dynamic_link_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
(::Google::Apps::Card::V1::Action) — An add-on triggers this action when the action needs to open a
link. This differs from theopen_linkabove in that this needs to talk
to server to get the link. Thus some preparation work is required for
web client to do before the open link action response comes back.
Note: The following fields are mutually exclusive:open_dynamic_link_action,action,open_link,card. If a field in that set is populated, all other fields in the set will automatically be cleared.
value(::Google::Apps::Card::V1::Action) — An add-on triggers this action when the action needs to open a
link. This differs from theopen_linkabove in that this needs to talk
to server to get the link. Thus some preparation work is required for
web client to do before the open link action response comes back.
Note: The following fields are mutually exclusive:open_dynamic_link_action,action,open_link,card. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::Google::Apps::Card::V1::Action) — An add-on triggers this action when the action needs to open a
link. This differs from theopen_linkabove in that this needs to talk
to server to get the link. Thus some preparation work is required for
web client to do before the open link action response comes back.
Note: The following fields are mutually exclusive:open_dynamic_link_action,action,open_link,card. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive:open_link,action,open_dynamic_link_action,card. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive:open_link,action,open_dynamic_link_action,card. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive:open_link,action,open_dynamic_link_action,card. If a field in that set is populated, all other fields in the set will automatically be cleared.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Chat V1 API - Class Google::Apps::Card::V1::OnClick (v0.14.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.14.0 (latest)](/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Card-V1-OnClick)\n- [0.13.0](/ruby/docs/reference/google-apps-chat-v1/0.13.0/Google-Apps-Card-V1-OnClick)\n- [0.12.0](/ruby/docs/reference/google-apps-chat-v1/0.12.0/Google-Apps-Card-V1-OnClick)\n- [0.11.1](/ruby/docs/reference/google-apps-chat-v1/0.11.1/Google-Apps-Card-V1-OnClick)\n- [0.10.0](/ruby/docs/reference/google-apps-chat-v1/0.10.0/Google-Apps-Card-V1-OnClick)\n- [0.9.1](/ruby/docs/reference/google-apps-chat-v1/0.9.1/Google-Apps-Card-V1-OnClick)\n- [0.8.0](/ruby/docs/reference/google-apps-chat-v1/0.8.0/Google-Apps-Card-V1-OnClick)\n- [0.7.0](/ruby/docs/reference/google-apps-chat-v1/0.7.0/Google-Apps-Card-V1-OnClick)\n- [0.6.0](/ruby/docs/reference/google-apps-chat-v1/0.6.0/Google-Apps-Card-V1-OnClick)\n- [0.5.1](/ruby/docs/reference/google-apps-chat-v1/0.5.1/Google-Apps-Card-V1-OnClick)\n- [0.4.0](/ruby/docs/reference/google-apps-chat-v1/0.4.0/Google-Apps-Card-V1-OnClick)\n- [0.3.1](/ruby/docs/reference/google-apps-chat-v1/0.3.1/Google-Apps-Card-V1-OnClick)\n- [0.2.0](/ruby/docs/reference/google-apps-chat-v1/0.2.0/Google-Apps-Card-V1-OnClick)\n- [0.1.2](/ruby/docs/reference/google-apps-chat-v1/0.1.2/Google-Apps-Card-V1-OnClick) \nReference documentation and code samples for the Google Chat V1 API class Google::Apps::Card::V1::OnClick.\n\nRepresents how to respond when users click an interactive element on\na card, such as a button.\n\n\n\u003cbr /\u003e\n\n[Google Workspace Add-ons and Chat\napps](https://developers.google.com/workspace/extend): \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #action\n\n def action() -\u003e ::Google::Apps::Card::V1::Action\n\n**Returns**\n\n- ([::Google::Apps::Card::V1::Action](./Google-Apps-Card-V1-Action)) --- If specified, an action is triggered by this `onClick`.\n\n\n Note: The following fields are mutually exclusive: `action`, `open_link`, `open_dynamic_link_action`, `card`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #action=\n\n def action=(value) -\u003e ::Google::Apps::Card::V1::Action\n\n**Parameter**\n\n- **value** ([::Google::Apps::Card::V1::Action](./Google-Apps-Card-V1-Action)) --- If specified, an action is triggered by this `onClick`.\n\n\nNote: The following fields are mutually exclusive: `action`, `open_link`, `open_dynamic_link_action`, `card`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Apps::Card::V1::Action](./Google-Apps-Card-V1-Action)) --- If specified, an action is triggered by this `onClick`.\n\n\n Note: The following fields are mutually exclusive: `action`, `open_link`, `open_dynamic_link_action`, `card`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #card\n\n def card() -\u003e ::Google::Apps::Card::V1::Card\n\n**Returns**\n\n- ([::Google::Apps::Card::V1::Card](./Google-Apps-Card-V1-Card)) --- A new card is pushed to the card stack after clicking if specified.\n\n\n [Google Workspace\n Add-ons](https://developers.google.com/workspace/add-ons):\n\n Note: The following fields are mutually exclusive: `card`, `action`, `open_link`, `open_dynamic_link_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #card=\n\n def card=(value) -\u003e ::Google::Apps::Card::V1::Card\n\n**Parameter**\n\n- **value** ([::Google::Apps::Card::V1::Card](./Google-Apps-Card-V1-Card)) --- A new card is pushed to the card stack after clicking if specified.\n\n\n [Google Workspace\n Add-ons](https://developers.google.com/workspace/add-ons):\n\nNote: The following fields are mutually exclusive: `card`, `action`, `open_link`, `open_dynamic_link_action`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Apps::Card::V1::Card](./Google-Apps-Card-V1-Card)) --- A new card is pushed to the card stack after clicking if specified.\n\n\n [Google Workspace\n Add-ons](https://developers.google.com/workspace/add-ons):\n\n Note: The following fields are mutually exclusive: `card`, `action`, `open_link`, `open_dynamic_link_action`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #open_dynamic_link_action\n\n def open_dynamic_link_action() -\u003e ::Google::Apps::Card::V1::Action\n\n**Returns**\n\n- ([::Google::Apps::Card::V1::Action](./Google-Apps-Card-V1-Action)) --- An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.\n\n\n [Google Workspace\n Add-ons](https://developers.google.com/workspace/add-ons):\n\n Note: The following fields are mutually exclusive: `open_dynamic_link_action`, `action`, `open_link`, `card`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #open_dynamic_link_action=\n\n def open_dynamic_link_action=(value) -\u003e ::Google::Apps::Card::V1::Action\n\n**Parameter**\n\n- **value** ([::Google::Apps::Card::V1::Action](./Google-Apps-Card-V1-Action)) --- An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.\n\n\n [Google Workspace\n Add-ons](https://developers.google.com/workspace/add-ons):\n\nNote: The following fields are mutually exclusive: `open_dynamic_link_action`, `action`, `open_link`, `card`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Apps::Card::V1::Action](./Google-Apps-Card-V1-Action)) --- An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.\n\n\n [Google Workspace\n Add-ons](https://developers.google.com/workspace/add-ons):\n\n Note: The following fields are mutually exclusive: `open_dynamic_link_action`, `action`, `open_link`, `card`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #open_link\n\n def open_link() -\u003e ::Google::Apps::Card::V1::OpenLink\n\n**Returns**\n\n- ([::Google::Apps::Card::V1::OpenLink](./Google-Apps-Card-V1-OpenLink)) --- If specified, this `onClick` triggers an open link action.\n\n\n Note: The following fields are mutually exclusive: `open_link`, `action`, `open_dynamic_link_action`, `card`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #open_link=\n\n def open_link=(value) -\u003e ::Google::Apps::Card::V1::OpenLink\n\n**Parameter**\n\n- **value** ([::Google::Apps::Card::V1::OpenLink](./Google-Apps-Card-V1-OpenLink)) --- If specified, this `onClick` triggers an open link action.\n\n\nNote: The following fields are mutually exclusive: `open_link`, `action`, `open_dynamic_link_action`, `card`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Apps::Card::V1::OpenLink](./Google-Apps-Card-V1-OpenLink)) --- If specified, this `onClick` triggers an open link action.\n\n\n Note: The following fields are mutually exclusive: `open_link`, `action`, `open_dynamic_link_action`, `card`. If a field in that set is populated, all other fields in the set will automatically be cleared."]]