CINXE.COM
Cards v2 | Google Chat | Google for Developers
<!doctype html> <html lang="en" dir="ltr"> <head> <meta name="google-signin-client-id" content="721724668570-nbkv1cfusk7kk4eni4pjvepaus73b13t.apps.googleusercontent.com"> <meta name="google-signin-scope" content="profile email https://www.googleapis.com/auth/developerprofiles https://www.googleapis.com/auth/developerprofiles.award"> <meta property="og:site_name" content="Google for Developers"> <meta property="og:type" content="website"><meta name="theme-color" content="#fff"><meta charset="utf-8"> <meta content="IE=Edge" http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="manifest" href="/_pwa/developers/manifest.json" crossorigin="use-credentials"> <link rel="preconnect" href="//www.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.googleapis.com" crossorigin> <link rel="preconnect" href="//apis.google.com" crossorigin> <link rel="preconnect" href="//www.google-analytics.com" crossorigin><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700&display=swap"> <link rel="stylesheet" href="//fonts.googleapis.com/css2?family=Material+Icons&family=Material+Symbols+Outlined&display=block"><link rel="stylesheet" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/css/app.css"> <link rel="shortcut icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/favicon-new.png"> <link rel="apple-touch-icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/touchicon-180-new.png"><link rel="canonical" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards"><link rel="search" type="application/opensearchdescription+xml" title="Google for Developers" href="https://developers.google.com/s/opensearch.xml"> <link rel="alternate" hreflang="en" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards" /><link rel="alternate" hreflang="x-default" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards" /><link rel="alternate" hreflang="ar" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=ar" /><link rel="alternate" hreflang="bn" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=bn" /><link rel="alternate" hreflang="zh-Hans" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=zh-cn" /><link rel="alternate" hreflang="zh-Hant" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=zh-tw" /><link rel="alternate" hreflang="fa" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=fa" /><link rel="alternate" hreflang="fr" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=fr" /><link rel="alternate" hreflang="de" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=de" /><link rel="alternate" hreflang="he" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=he" /><link rel="alternate" hreflang="hi" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=hi" /><link rel="alternate" hreflang="id" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=id" /><link rel="alternate" hreflang="it" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=it" /><link rel="alternate" hreflang="ja" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=ja" /><link rel="alternate" hreflang="ko" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=ko" /><link rel="alternate" hreflang="pl" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=pl" /><link rel="alternate" hreflang="pt-BR" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=pt-br" /><link rel="alternate" hreflang="ru" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=ru" /><link rel="alternate" hreflang="es-419" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=es-419" /><link rel="alternate" hreflang="th" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=th" /><link rel="alternate" hreflang="tr" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=tr" /><link rel="alternate" hreflang="vi" href="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards?hl=vi" /><title>Cards v2 | Google Chat | Google for Developers</title> <meta property="og:title" content="Cards v2 | Google Chat | Google for Developers"><meta property="og:url" content="https://developers.google.com/workspace/chat/api/reference/rest/v1/cards"><meta property="og:image" content="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/opengraph/white.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="675"><meta property="og:locale" content="en"><meta name="twitter:card" content="summary_large_image"><script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "Google Workspace", "item": "https://developers.google.com/workspace" },{ "@type": "ListItem", "position": 2, "name": "Google Chat", "item": "https://developers.google.com/workspace/chat" },{ "@type": "ListItem", "position": 3, "name": "Cards v2", "item": "https://developers.google.com/workspace/chat/api/reference/rest/v1/cards" }] } </script> <link rel="stylesheet" href="/extras.css"></head> <body class="docs" template="page" theme="white" type="reference" itemscope itemtype="http://developers.google.com/ReferenceObject" layout="docs" concierge='closed' display-toc pending> <devsite-progress type="indeterminate" id="app-progress"></devsite-progress> <section class="devsite-wrapper"> <devsite-cookie-notification-bar></devsite-cookie-notification-bar><devsite-header role="banner"> <div class="devsite-header--inner nocontent"> <div class="devsite-top-logo-row-wrapper-wrapper"> <div class="devsite-top-logo-row-wrapper"> <div class="devsite-top-logo-row"> <button type="button" id="devsite-hamburger-menu" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Navigation menu button" visually-hidden aria-label="Open menu"> </button> <div class="devsite-product-name-wrapper"> <a href="https://developers.google.com/workspace"> <div class="devsite-product-logo-container" size="medium" > <picture> <img class="devsite-product-logo" alt="Google Workspace" src="https://fonts.gstatic.com/s/i/productlogos/googleg/v6/16px.svg" srcset=" https://fonts.gstatic.com/s/i/productlogos/googleg/v6/16px.svg" sizes="64px" loading="lazy" > </picture> </div> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item devsite-has-google-wordmark"> <a href="https://developers.google.com/workspace" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Upper Header" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="Google Workspace" > <svg class="devsite-google-wordmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 148 48"> <title>Google</title> <path class="devsite-google-wordmark-svg-path" d="M19.58,37.65c-9.87,0-18.17-8.04-18.17-17.91c0-9.87,8.3-17.91,18.17-17.91c5.46,0,9.35,2.14,12.27,4.94l-3.45,3.45c-2.1-1.97-4.93-3.49-8.82-3.49c-7.21,0-12.84,5.81-12.84,13.02c0,7.21,5.64,13.02,12.84,13.02c4.67,0,7.34-1.88,9.04-3.58c1.4-1.4,2.32-3.41,2.66-6.16H19.58v-4.89h16.47c0.18,0.87,0.26,1.92,0.26,3.06c0,3.67-1.01,8.21-4.24,11.44C28.93,35.9,24.91,37.65,19.58,37.65z M61.78,26.12c0,6.64-5.1,11.53-11.36,11.53s-11.36-4.89-11.36-11.53c0-6.68,5.1-11.53,11.36-11.53S61.78,19.43,61.78,26.12z M56.8,26.12c0-4.15-2.96-6.99-6.39-6.99c-3.43,0-6.39,2.84-6.39,6.99c0,4.11,2.96,6.99,6.39,6.99C53.84,33.11,56.8,30.22,56.8,26.12z M87.25,26.12c0,6.64-5.1,11.53-11.36,11.53c-6.26,0-11.36-4.89-11.36-11.53c0-6.68,5.1-11.53,11.36-11.53C82.15,14.59,87.25,19.43,87.25,26.12zM82.28,26.12c0-4.15-2.96-6.99-6.39-6.99c-3.43,0-6.39,2.84-6.39,6.99c0,4.11,2.96,6.99,6.39,6.99C79.32,33.11,82.28,30.22,82.28,26.12z M112.09,15.29v20.7c0,8.52-5.02,12.01-10.96,12.01c-5.59,0-8.95-3.76-10.22-6.81l4.41-1.83c0.79,1.88,2.71,4.1,5.81,4.1c3.8,0,6.16-2.36,6.16-6.77v-1.66h-0.18c-1.14,1.4-3.32,2.62-6.07,2.62c-5.76,0-11.05-5.02-11.05-11.49c0-6.51,5.28-11.57,11.05-11.57c2.75,0,4.93,1.22,6.07,2.58h0.18v-1.88H112.09z M107.64,26.16c0-4.06-2.71-7.03-6.16-7.03c-3.49,0-6.42,2.97-6.42,7.03c0,4.02,2.93,6.94,6.42,6.94C104.93,33.11,107.64,30.18,107.64,26.16z M120.97,3.06v33.89h-5.07V3.06H120.97z M140.89,29.92l3.93,2.62c-1.27,1.88-4.32,5.11-9.61,5.11c-6.55,0-11.28-5.07-11.28-11.53c0-6.86,4.77-11.53,10.71-11.53c5.98,0,8.91,4.76,9.87,7.34l0.52,1.31l-15.42,6.38c1.18,2.31,3.01,3.49,5.59,3.49C137.79,33.11,139.58,31.84,140.89,29.92zM128.79,25.77l10.31-4.28c-0.57-1.44-2.27-2.45-4.28-2.45C132.24,19.04,128.66,21.31,128.79,25.77z"/> </svg>Workspace </a> </li> </ul> </span> </div> <div class="devsite-top-logo-row-middle"> <div class="devsite-header-upper-tabs"> <devsite-tabs class="upper-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Upper tabs"> <tab > <a href="https://developers.google.com/workspace" track-metadata-eventdetail="https://developers.google.com/workspace" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - home" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Home" track-name="home" > Home </a> </tab> <tab class="devsite-active"> <a href="https://developers.google.com/workspace/chat" track-metadata-eventdetail="https://developers.google.com/workspace/chat" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - google chat" track-metadata-module="primary nav" aria-label="Google Chat, selected" data-category="Site-Wide Custom Events" data-label="Tab: Google Chat" track-name="google chat" > Google Chat </a> </tab> <tab class="devsite-dropdown "> <a href="https://developers.google.com/workspace/products-menu" track-metadata-eventdetail="https://developers.google.com/workspace/products-menu" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - all products" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: All products" track-name="all products" > All products </a> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for All products" track-type="nav" track-metadata-eventdetail="https://developers.google.com/workspace/products-menu" track-metadata-position="nav - all products" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: All products" track-name="all products" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column "> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-title" role="heading" tooltip>Google Workspace apps</li> <li class="devsite-nav-item"> <a href="https://developers.google.com/admin-sdk" track-type="nav" track-metadata-eventdetail="https://developers.google.com/admin-sdk" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline="google workspace apps" tooltip data-label="Tab menu: All products - Admin console" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Admin console </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/cloud-search" track-type="nav" track-metadata-eventdetail="https://developers.google.com/cloud-search" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline="google workspace apps" tooltip data-label="Tab menu: All products - Cloud Search" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Cloud Search </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/gmail" track-type="nav" track-metadata-eventdetail="https://developers.google.com/gmail" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline="google workspace apps" tooltip data-label="Tab menu: All products - Gmail" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Gmail </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/calendar" track-type="nav" track-metadata-eventdetail="https://developers.google.com/calendar" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline="google workspace apps" tooltip data-label="Tab menu: All products - Google Calendar" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Google Calendar </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/workspace/chat" track-type="nav" track-metadata-eventdetail="https://developers.google.com/workspace/chat" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline="google workspace apps" tooltip data-label="Tab menu: All products - Google Chat" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Google Chat </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/classroom" track-type="nav" track-metadata-eventdetail="https://developers.google.com/classroom" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline="google workspace apps" tooltip data-category="Workspace top menu navigation" data-label="Tab menu: All products - Google Classroom" > <div class="devsite-nav-item-title"> Google Classroom </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/docs" track-type="nav" track-metadata-eventdetail="https://developers.google.com/docs" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline="google workspace apps" tooltip data-label="Tab menu: All products - Google Docs" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Google Docs </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/drive" track-type="nav" track-metadata-eventdetail="https://developers.google.com/drive" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline="google workspace apps" tooltip data-label="Tab menu: All products - Google Drive" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Google Drive </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column "> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-title" role="heading" tooltip> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/forms" track-type="nav" track-metadata-eventdetail="https://developers.google.com/forms" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline=" " tooltip data-label="Tab menu: All products - Google Forms" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Google Forms </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/keep" track-type="nav" track-metadata-eventdetail="https://developers.google.com/keep" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline=" " tooltip data-label="Tab menu: All products - Google Keep" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Google Keep </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/meet" track-type="nav" track-metadata-eventdetail="https://developers.google.com/meet" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline=" " tooltip data-category="Workspace top menu navigation" data-label="Tab menu: All products - Google Meet" > <div class="devsite-nav-item-title"> Google Meet </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/sheets" track-type="nav" track-metadata-eventdetail="https://developers.google.com/sheets" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline=" " tooltip data-category="Workspace top menu navigation" data-label="Tab menu: All products - Google Sheets" > <div class="devsite-nav-item-title"> Google Sheets </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/workspace/sites" track-type="nav" track-metadata-eventdetail="https://developers.google.com/workspace/sites" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline=" " tooltip data-label="Tab menu: All products - Google Sites" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Google Sites </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/slides" track-type="nav" track-metadata-eventdetail="https://developers.google.com/slides" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline=" " tooltip data-category="Workspace top menu navigation" data-label="Tab menu: All products - Google Slides" > <div class="devsite-nav-item-title"> Google Slides </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/tasks" track-type="nav" track-metadata-eventdetail="https://developers.google.com/tasks" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline=" " tooltip data-label="Tab menu: All products - Google Tasks" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Google Tasks </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/vault" track-type="nav" track-metadata-eventdetail="https://developers.google.com/vault" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline=" " tooltip data-label="Tab menu: All products - Google Vault" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Google Vault </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column "> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-title" role="heading" tooltip>Extend, automate & share</li> <li class="devsite-nav-item"> <a href="https://developers.google.com/workspace/add-ons" track-type="nav" track-metadata-eventdetail="https://developers.google.com/workspace/add-ons" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline="extend, automate & share" tooltip data-category="Workspace top menu navigation" data-label="Tab menu: All products - Add-ons" > <div class="devsite-nav-item-title"> Add-ons </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/apps-script" track-type="nav" track-metadata-eventdetail="https://developers.google.com/apps-script" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline="extend, automate & share" tooltip data-category="Workspace top menu navigation" data-label="Tab menu: All products - Apps Script" > <div class="devsite-nav-item-title"> Apps Script </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/workspace/chat/overview" track-type="nav" track-metadata-eventdetail="https://developers.google.com/workspace/chat/overview" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline="extend, automate & share" tooltip data-label="Tab menu: All products - Chat apps" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Chat apps </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/drive/api/guides/about-apps" track-type="nav" track-metadata-eventdetail="https://developers.google.com/drive/api/guides/about-apps" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline="extend, automate & share" tooltip data-category="Workspace top menu navigation" data-label="Tab menu: All products - Drive apps" > <div class="devsite-nav-item-title"> Drive apps </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/workspace/marketplace" track-type="nav" track-metadata-eventdetail="https://developers.google.com/workspace/marketplace" track-metadata-position="nav - all products" track-metadata-module="tertiary nav" track-metadata-module_headline="extend, automate & share" tooltip data-label="Tab menu: All products - Marketplace" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Marketplace </div> </a> </li> </ul> </div> </div> </div> </tab> <tab class="devsite-dropdown "> <a href="https://developers.google.com/workspace/resources-menu" track-metadata-eventdetail="https://developers.google.com/workspace/resources-menu" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - resources" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Resources" track-name="resources" > Resources </a> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for Resources" track-type="nav" track-metadata-eventdetail="https://developers.google.com/workspace/resources-menu" track-metadata-position="nav - resources" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Resources" track-name="resources" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column "> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-title" role="heading" tooltip>Tools</li> <li class="devsite-nav-item"> <a href="https://admin.google.com/" track-type="nav" track-metadata-eventdetail="https://admin.google.com/" track-metadata-position="nav - resources" track-metadata-module="tertiary nav" track-metadata-module_headline="tools" tooltip data-label="Tab menu: Resources - Admin console" target="admin-console" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Admin console </div> </a> </li> <li class="devsite-nav-item"> <a href="https://script.google.com/" track-type="nav" track-metadata-eventdetail="https://script.google.com/" track-metadata-position="nav - resources" track-metadata-module="tertiary nav" track-metadata-module_headline="tools" tooltip data-label="Tab menu: Resources - Apps Script dashboard" target="_blank" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Apps Script dashboard </div> </a> </li> <li class="devsite-nav-item"> <a href="https://console.cloud.google.com/workspace-api" track-type="nav" track-metadata-eventdetail="https://console.cloud.google.com/workspace-api" track-metadata-position="nav - resources" track-metadata-module="tertiary nav" track-metadata-module_headline="tools" tooltip data-label="Tab menu: Resources - Google Cloud console" target="console" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Google Cloud console </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/workspace/explore" track-type="nav" track-metadata-eventdetail="https://developers.google.com/workspace/explore" track-metadata-position="nav - resources" track-metadata-module="tertiary nav" track-metadata-module_headline="tools" tooltip data-label="Tab menu: Resources - APIs Explorer" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> APIs Explorer </div> </a> </li> <li class="devsite-nav-item"> <a href="https://addons.gsuite.google.com/uikit/builder" track-type="nav" track-metadata-eventdetail="https://addons.gsuite.google.com/uikit/builder" track-metadata-position="nav - resources" track-metadata-module="tertiary nav" track-metadata-module_headline="tools" tooltip data-label="Tab menu: Resources - Card Builder" target="_blank" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Card Builder </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column "> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-title" role="heading" tooltip>Training & support</li> <li class="devsite-nav-item"> <a href="https://developers.google.com/workspace/guides/get-started" track-type="nav" track-metadata-eventdetail="https://developers.google.com/workspace/guides/get-started" track-metadata-position="nav - resources" track-metadata-module="tertiary nav" track-metadata-module_headline="training & support" tooltip data-label="Tab menu: Resources - How to get started" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> How to get started </div> </a> </li> <li class="devsite-nav-item"> <a href="https://codelabs.developers.google.com/?product=googleworkspace" track-type="nav" track-metadata-eventdetail="https://codelabs.developers.google.com/?product=googleworkspace" track-metadata-position="nav - resources" track-metadata-module="tertiary nav" track-metadata-module_headline="training & support" tooltip data-category="Workspace top menu navigation" data-label="Tab menu: Resources - Codelabs" target="_blank" > <div class="devsite-nav-item-title"> Codelabs </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/workspace/support" track-type="nav" track-metadata-eventdetail="https://developers.google.com/workspace/support" track-metadata-position="nav - resources" track-metadata-module="tertiary nav" track-metadata-module_headline="training & support" tooltip data-label="Tab menu: Resources - Developer support" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Developer support </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column "> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-title" role="heading" tooltip>Updates</li> <li class="devsite-nav-item"> <a href="https://developers.googleblog.com/search/?query=Google+Workspace" track-type="nav" track-metadata-eventdetail="https://developers.googleblog.com/search/?query=Google+Workspace" track-metadata-position="nav - resources" track-metadata-module="tertiary nav" track-metadata-module_headline="updates" tooltip data-category="Workspace top menu navigation" data-label="Tab menu: Resources - Blog" target="_blank" > <div class="devsite-nav-item-title"> Blog </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/workspace/preview" track-type="nav" track-metadata-eventdetail="https://developers.google.com/workspace/preview" track-metadata-position="nav - resources" track-metadata-module="tertiary nav" track-metadata-module_headline="updates" tooltip data-label="Tab menu: Resources - Developer previews" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> Developer Previews </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/workspace/newsletters" track-type="nav" track-metadata-eventdetail="https://developers.google.com/workspace/newsletters" track-metadata-position="nav - resources" track-metadata-module="tertiary nav" track-metadata-module_headline="updates" tooltip data-category="Workspace top menu navigation" data-label="Tab menu: Resources - Newsletter" > <div class="devsite-nav-item-title"> Newsletter </div> </a> </li> <li class="devsite-nav-item"> <a href="https://twitter.com/workspacedevs" track-type="nav" track-metadata-eventdetail="https://twitter.com/workspacedevs" track-metadata-position="nav - resources" track-metadata-module="tertiary nav" track-metadata-module_headline="updates" tooltip data-label="Tab menu: Resources - X (Twitter)" target="_blank" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> X (Twitter) </div> </a> </li> <li class="devsite-nav-item"> <a href="https://www.youtube.com/channel/UCUcg6az6etU_gRtZVAhBXaw" track-type="nav" track-metadata-eventdetail="https://www.youtube.com/channel/UCUcg6az6etU_gRtZVAhBXaw" track-metadata-position="nav - resources" track-metadata-module="tertiary nav" track-metadata-module_headline="updates" tooltip target="_blank" data-label="Tab menu: Resources - YouTube" data-category="Workspace top menu navigation" > <div class="devsite-nav-item-title"> YouTube </div> </a> </li> </ul> </div> </div> </div> </tab> </nav> </devsite-tabs> </div> <devsite-search enable-signin enable-search enable-suggestions enable-query-completion project-name="Google Chat" tenant-name="Google for Developers" project-scope="/workspace/chat" url-scoped="https://developers.google.com/s/results/workspace/chat" > <form class="devsite-search-form" action="https://developers.google.com/s/results" method="GET"> <div class="devsite-search-container"> <button type="button" search-open class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Open search"></button> <div class="devsite-searchbox"> <input aria-activedescendant="" aria-autocomplete="list" aria-label="Search" aria-expanded="false" aria-haspopup="listbox" autocomplete="off" class="devsite-search-field devsite-search-query" name="q" placeholder="Search" role="combobox" type="text" value="" > <div class="devsite-search-image material-icons" aria-hidden="true"> </div> <div class="devsite-search-shortcut-icon-container" aria-hidden="true"> <kbd class="devsite-search-shortcut-icon">/</kbd> </div> </div> </div> </form> <button type="button" search-close class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Close search"></button> </devsite-search> </div> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es" >Español</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> <devsite-user enable-profiles fp-auth id="devsite-user"> <span class="button devsite-top-button" aria-hidden="true" visually-hidden>Sign in</span> </devsite-user> </div> </div> </div> <div class="devsite-collapsible-section "> <div class="devsite-header-background"> <div class="devsite-product-id-row" > <div class="devsite-product-description-row"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item "> <a href="https://developers.google.com/workspace/chat" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Lower Header" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="Google Chat" > Google Chat </a> </li> </ul> </div> </div> <div class="devsite-doc-set-nav-row"> <devsite-tabs class="lower-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Lower tabs"> <tab > <a href="https://developers.google.com/workspace/chat" track-metadata-eventdetail="https://developers.google.com/workspace/chat" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - overview" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Overview" track-name="overview" > Overview </a> </tab> <tab > <a href="https://developers.google.com/workspace/chat/overview" track-metadata-eventdetail="https://developers.google.com/workspace/chat/overview" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - guides" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Guides" track-name="guides" > Guides </a> </tab> <tab class="devsite-active"> <a href="https://developers.google.com/workspace/chat/api/reference" track-metadata-eventdetail="https://developers.google.com/workspace/chat/api/reference" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - reference" track-metadata-module="primary nav" aria-label="Reference, selected" data-category="Site-Wide Custom Events" data-label="Tab: Reference" track-name="reference" > Reference </a> </tab> <tab > <a href="https://developers.google.com/workspace/chat/samples" track-metadata-eventdetail="https://developers.google.com/workspace/chat/samples" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - samples" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Samples" track-name="samples" > Samples </a> </tab> <tab > <a href="https://developers.google.com/workspace/chat/support" track-metadata-eventdetail="https://developers.google.com/workspace/chat/support" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - support" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Support" track-name="support" > Support </a> </tab> <tab > <a href="https://addons.gsuite.google.com/uikit/builder" track-metadata-eventdetail="https://addons.gsuite.google.com/uikit/builder" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - card builder" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Card builder" track-name="card builder" > Card builder </a> </tab> </nav> </devsite-tabs> </div> </div> </div> </div> </devsite-header> <devsite-book-nav scrollbars > <div class="devsite-book-nav-filter" > <span class="filter-list-icon material-icons" aria-hidden="true"></span> <input type="text" placeholder="Filter" aria-label="Type to filter" role="searchbox"> <span class="filter-clear-button hidden" data-title="Clear filter" aria-label="Clear filter" role="button" tabindex="0"></span> </div> <nav class="devsite-book-nav devsite-nav nocontent" aria-label="Side menu"> <div class="devsite-mobile-header"> <button type="button" id="devsite-close-nav" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Close navigation" aria-label="Close navigation"> </button> <div class="devsite-product-name-wrapper"> <a href="https://developers.google.com/workspace"> <div class="devsite-product-logo-container" size="medium" > <picture> <img class="devsite-product-logo" alt="Google Workspace" src="https://fonts.gstatic.com/s/i/productlogos/googleg/v6/16px.svg" srcset=" https://fonts.gstatic.com/s/i/productlogos/googleg/v6/16px.svg" sizes="64px" loading="lazy" > </picture> </div> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item devsite-has-google-wordmark"> <a href="https://developers.google.com/workspace" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Upper Header" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="Google Workspace" > <svg class="devsite-google-wordmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 148 48"> <title>Google</title> <path class="devsite-google-wordmark-svg-path" d="M19.58,37.65c-9.87,0-18.17-8.04-18.17-17.91c0-9.87,8.3-17.91,18.17-17.91c5.46,0,9.35,2.14,12.27,4.94l-3.45,3.45c-2.1-1.97-4.93-3.49-8.82-3.49c-7.21,0-12.84,5.81-12.84,13.02c0,7.21,5.64,13.02,12.84,13.02c4.67,0,7.34-1.88,9.04-3.58c1.4-1.4,2.32-3.41,2.66-6.16H19.58v-4.89h16.47c0.18,0.87,0.26,1.92,0.26,3.06c0,3.67-1.01,8.21-4.24,11.44C28.93,35.9,24.91,37.65,19.58,37.65z M61.78,26.12c0,6.64-5.1,11.53-11.36,11.53s-11.36-4.89-11.36-11.53c0-6.68,5.1-11.53,11.36-11.53S61.78,19.43,61.78,26.12z M56.8,26.12c0-4.15-2.96-6.99-6.39-6.99c-3.43,0-6.39,2.84-6.39,6.99c0,4.11,2.96,6.99,6.39,6.99C53.84,33.11,56.8,30.22,56.8,26.12z M87.25,26.12c0,6.64-5.1,11.53-11.36,11.53c-6.26,0-11.36-4.89-11.36-11.53c0-6.68,5.1-11.53,11.36-11.53C82.15,14.59,87.25,19.43,87.25,26.12zM82.28,26.12c0-4.15-2.96-6.99-6.39-6.99c-3.43,0-6.39,2.84-6.39,6.99c0,4.11,2.96,6.99,6.39,6.99C79.32,33.11,82.28,30.22,82.28,26.12z M112.09,15.29v20.7c0,8.52-5.02,12.01-10.96,12.01c-5.59,0-8.95-3.76-10.22-6.81l4.41-1.83c0.79,1.88,2.71,4.1,5.81,4.1c3.8,0,6.16-2.36,6.16-6.77v-1.66h-0.18c-1.14,1.4-3.32,2.62-6.07,2.62c-5.76,0-11.05-5.02-11.05-11.49c0-6.51,5.28-11.57,11.05-11.57c2.75,0,4.93,1.22,6.07,2.58h0.18v-1.88H112.09z M107.64,26.16c0-4.06-2.71-7.03-6.16-7.03c-3.49,0-6.42,2.97-6.42,7.03c0,4.02,2.93,6.94,6.42,6.94C104.93,33.11,107.64,30.18,107.64,26.16z M120.97,3.06v33.89h-5.07V3.06H120.97z M140.89,29.92l3.93,2.62c-1.27,1.88-4.32,5.11-9.61,5.11c-6.55,0-11.28-5.07-11.28-11.53c0-6.86,4.77-11.53,10.71-11.53c5.98,0,8.91,4.76,9.87,7.34l0.52,1.31l-15.42,6.38c1.18,2.31,3.01,3.49,5.59,3.49C137.79,33.11,139.58,31.84,140.89,29.92zM128.79,25.77l10.31-4.28c-0.57-1.44-2.27-2.45-4.28-2.45C132.24,19.04,128.66,21.31,128.79,25.77z"/> </svg>Workspace </a> </li> </ul> </span> </div> </div> <div class="devsite-book-nav-wrapper"> <div class="devsite-mobile-nav-top"> <ul class="devsite-nav-list"> <li class="devsite-nav-item"> <a href="/workspace" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Home" track-name="home" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Home" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Home </span> </a> </li> <li class="devsite-nav-item"> <a href="/workspace/chat" class="devsite-nav-title gc-analytics-event devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Google Chat" track-name="google chat" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Chat" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Chat </span> </a> <ul class="devsite-nav-responsive-tabs"> <li class="devsite-nav-item"> <a href="/workspace/chat" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Overview" track-name="overview" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Overview </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/workspace/chat/overview" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Guides" track-name="guides" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Guides" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Guides </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/workspace/chat/api/reference" class="devsite-nav-title gc-analytics-event devsite-nav-has-children devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Reference" track-name="reference" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Reference" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip menu="_book"> Reference </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="_book"> </span> </a> </li> <li class="devsite-nav-item"> <a href="/workspace/chat/samples" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Samples" track-name="samples" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Samples" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Samples </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/workspace/chat/support" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Support" track-name="support" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Support" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Support </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="https://addons.gsuite.google.com/uikit/builder" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Card builder" track-name="card builder" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Card builder" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Card builder </span> </a> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/workspace/products-menu" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: All products" track-name="all products" data-category="Site-Wide Custom Events" data-label="Responsive Tab: All products" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > All products </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu "> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: All products" track-name="all products" > <span class="devsite-nav-text" tooltip menu="All products"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="All products"> </span> </span> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/workspace/resources-menu" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Resources" track-name="resources" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Resources" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Resources </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu "> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Resources" track-name="resources" > <span class="devsite-nav-text" tooltip menu="Resources"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Resources"> </span> </span> </li> </ul> </li> </ul> </div> <div class="devsite-mobile-nav-bottom"> <ul class="devsite-nav-list" menu="_book"> <li class="devsite-nav-item"><a href="/workspace/chat/api/reference" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference" ><span class="devsite-nav-text" tooltip>Overview</span></a></li> <li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>RPC reference</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rpc" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rpc" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rpc" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rpc/google.apps.card.v1" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rpc/google.apps.card.v1" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rpc/google.apps.card.v1" ><span class="devsite-nav-text" tooltip>google.apps.card.v1</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rpc/google.chat.logging.v1" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rpc/google.chat.logging.v1" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rpc/google.chat.logging.v1" ><span class="devsite-nav-text" tooltip>google.chat.logging.v1</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rpc/google.chat.v1" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rpc/google.chat.v1" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rpc/google.chat.v1" ><span class="devsite-nav-text" tooltip>google.chat.v1</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rpc/google.rpc" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rpc/google.rpc" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rpc/google.rpc" ><span class="devsite-nav-text" tooltip>google.rpc</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rpc/google.type" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rpc/google.type" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rpc/google.type" ><span class="devsite-nav-text" tooltip>google.type</span></a></li></ul></div></li> <li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>REST reference</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>REST Resources</span> </div></li><li class="devsite-nav-item devsite-nav-expandable devsite-nav-preview"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>customEmojis</span><span class="devsite-nav-icon material-icons" data-icon="preview" data-title="Preview" aria-hidden="true"></span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item devsite-nav-preview"><a href="/workspace/chat/api/reference/rest/v1/customEmojis" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/customEmojis" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/customEmojis" ><span class="devsite-nav-text" tooltip>Overview</span><span class="devsite-nav-icon material-icons" data-icon="preview" data-title="Preview" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-preview"><a href="/workspace/chat/api/reference/rest/v1/customEmojis/create" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/customEmojis/create" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/customEmojis/create" ><span class="devsite-nav-text" tooltip>create</span><span class="devsite-nav-icon material-icons" data-icon="preview" data-title="Preview" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-preview"><a href="/workspace/chat/api/reference/rest/v1/customEmojis/delete" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/customEmojis/delete" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/customEmojis/delete" ><span class="devsite-nav-text" tooltip>delete</span><span class="devsite-nav-icon material-icons" data-icon="preview" data-title="Preview" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-preview"><a href="/workspace/chat/api/reference/rest/v1/customEmojis/get" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/customEmojis/get" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/customEmojis/get" ><span class="devsite-nav-text" tooltip>get</span><span class="devsite-nav-icon material-icons" data-icon="preview" data-title="Preview" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-preview"><a href="/workspace/chat/api/reference/rest/v1/customEmojis/list" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/customEmojis/list" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/customEmojis/list" ><span class="devsite-nav-text" tooltip>list</span><span class="devsite-nav-icon material-icons" data-icon="preview" data-title="Preview" aria-hidden="true"></span></a></li></ul></div></li><li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>media</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/media" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/media" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/media" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/media/download" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/media/download" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/media/download" ><span class="devsite-nav-text" tooltip>download</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/media/upload" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/media/upload" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/media/upload" ><span class="devsite-nav-text" tooltip>upload</span></a></li></ul></div></li><li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>spaces</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces/completeImport" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces/completeImport" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces/completeImport" ><span class="devsite-nav-text" tooltip>completeImport</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces/create" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces/create" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces/create" ><span class="devsite-nav-text" tooltip>create</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces/delete" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces/delete" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces/delete" ><span class="devsite-nav-text" tooltip>delete</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces/findDirectMessage" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces/findDirectMessage" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces/findDirectMessage" ><span class="devsite-nav-text" tooltip>findDirectMessage</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces/get" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces/get" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces/get" ><span class="devsite-nav-text" tooltip>get</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces/list" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces/list" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces/list" ><span class="devsite-nav-text" tooltip>list</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces/patch" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces/patch" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces/patch" ><span class="devsite-nav-text" tooltip>patch</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces/search" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces/search" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces/search" ><span class="devsite-nav-text" tooltip>search</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces/setup" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces/setup" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces/setup" ><span class="devsite-nav-text" tooltip>setup</span></a></li></ul></div></li><li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>spaces.members</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.members" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.members" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.members" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.members/create" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.members/create" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.members/create" ><span class="devsite-nav-text" tooltip>create</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.members/delete" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.members/delete" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.members/delete" ><span class="devsite-nav-text" tooltip>delete</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.members/get" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.members/get" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.members/get" ><span class="devsite-nav-text" tooltip>get</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.members/list" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.members/list" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.members/list" ><span class="devsite-nav-text" tooltip>list</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.members/patch" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.members/patch" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.members/patch" ><span class="devsite-nav-text" tooltip>patch</span></a></li></ul></div></li><li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>spaces.messages</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>Overview</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.messages" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.messages" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.messages" ><span class="devsite-nav-text" tooltip>Messages</span></a></li><li class="devsite-nav-item devsite-nav-deprecated"><a href="/workspace/chat/api/reference/rest/v1/cards-v1" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/cards-v1" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/cards-v1" ><span class="devsite-nav-text" tooltip>Cards v1</span><span class="devsite-nav-icon material-icons" data-icon="deprecated" data-title="Deprecated" aria-hidden="true"></span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/cards" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/cards" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/cards" ><span class="devsite-nav-text" tooltip>Cards v2</span></a></li></ul></div></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.messages/create" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.messages/create" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.messages/create" ><span class="devsite-nav-text" tooltip>create</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.messages/delete" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.messages/delete" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.messages/delete" ><span class="devsite-nav-text" tooltip>delete</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.messages/get" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.messages/get" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.messages/get" ><span class="devsite-nav-text" tooltip>get</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.messages/list" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.messages/list" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.messages/list" ><span class="devsite-nav-text" tooltip>list</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.messages/patch" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.messages/patch" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.messages/patch" ><span class="devsite-nav-text" tooltip>patch</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.messages/update" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.messages/update" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.messages/update" ><span class="devsite-nav-text" tooltip>update</span></a></li></ul></div></li><li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>spaces.messages.attachments</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.messages.attachments" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.messages.attachments" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.messages.attachments" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.messages.attachments/get" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.messages.attachments/get" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.messages.attachments/get" ><span class="devsite-nav-text" tooltip>get</span></a></li></ul></div></li><li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>spaces.messages.reactions</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.messages.reactions" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.messages.reactions" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.messages.reactions" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.messages.reactions/create" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.messages.reactions/create" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.messages.reactions/create" ><span class="devsite-nav-text" tooltip>create</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.messages.reactions/delete" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.messages.reactions/delete" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.messages.reactions/delete" ><span class="devsite-nav-text" tooltip>delete</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.messages.reactions/list" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.messages.reactions/list" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.messages.reactions/list" ><span class="devsite-nav-text" tooltip>list</span></a></li></ul></div></li><li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>spaces.spaceEvents</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.spaceEvents" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.spaceEvents" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.spaceEvents" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.spaceEvents/get" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.spaceEvents/get" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.spaceEvents/get" ><span class="devsite-nav-text" tooltip>get</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/spaces.spaceEvents/list" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/spaces.spaceEvents/list" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/spaces.spaceEvents/list" ><span class="devsite-nav-text" tooltip>list</span></a></li></ul></div></li><li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>users.spaces</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/users.spaces" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/users.spaces" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/users.spaces" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/users.spaces/getSpaceReadState" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/users.spaces/getSpaceReadState" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/users.spaces/getSpaceReadState" ><span class="devsite-nav-text" tooltip>getSpaceReadState</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/users.spaces/updateSpaceReadState" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/users.spaces/updateSpaceReadState" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/users.spaces/updateSpaceReadState" ><span class="devsite-nav-text" tooltip>updateSpaceReadState</span></a></li></ul></div></li><li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>users.spaces.spaceNotificationSetting</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/users.spaces.spaceNotificationSetting" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/users.spaces.spaceNotificationSetting" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/users.spaces.spaceNotificationSetting" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/users.spaces.spaceNotificationSetting/get" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/users.spaces.spaceNotificationSetting/get" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/users.spaces.spaceNotificationSetting/get" ><span class="devsite-nav-text" tooltip>get</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/users.spaces.spaceNotificationSetting/patch" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/users.spaces.spaceNotificationSetting/patch" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/users.spaces.spaceNotificationSetting/patch" ><span class="devsite-nav-text" tooltip>patch</span></a></li></ul></div></li><li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>users.spaces.threads</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/users.spaces.threads" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/users.spaces.threads" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/users.spaces.threads" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/users.spaces.threads/getThreadReadState" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/users.spaces.threads/getThreadReadState" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/users.spaces.threads/getThreadReadState" ><span class="devsite-nav-text" tooltip>getThreadReadState</span></a></li></ul></div></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Types</span> </div></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/ChatAppLogEntry" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/ChatAppLogEntry" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/ChatAppLogEntry" ><span class="devsite-nav-text" tooltip>ChatAppLogEntry</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/DialogEventType" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/DialogEventType" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/DialogEventType" ><span class="devsite-nav-text" tooltip>DialogEventType</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/DriveDataRef" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/DriveDataRef" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/DriveDataRef" ><span class="devsite-nav-text" tooltip>DriveDataRef</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/Emoji" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/Emoji" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/Emoji" ><span class="devsite-nav-text" tooltip>Emoji</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/Event" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/Event" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/Event" ><span class="devsite-nav-text" tooltip>Event</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/EventType" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/EventType" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/EventType" ><span class="devsite-nav-text" tooltip>EventType</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/HostApp" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/HostApp" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/HostApp" ><span class="devsite-nav-text" tooltip>HostApp</span></a></li><li class="devsite-nav-item"><a href="/workspace/chat/api/reference/rest/v1/User" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/api/reference/rest/v1/User" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/api/reference/rest/v1/User" ><span class="devsite-nav-text" tooltip>User</span></a></li></ul></div></li> <li class="devsite-nav-item"><a href="/workspace/chat/limits" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /workspace/chat/limits" track-type="bookNav" track-name="click" track-metadata-eventdetail="/workspace/chat/limits" ><span class="devsite-nav-text" tooltip>Limits and quotas</span></a></li> </ul> <ul class="devsite-nav-list" menu="All products" aria-label="Side menu" hidden> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Google Workspace apps </span> </span> </li> <li class="devsite-nav-item"> <a href="/admin-sdk" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Admin console" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Admin console </span> </a> </li> <li class="devsite-nav-item"> <a href="/cloud-search" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Cloud Search" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Cloud Search </span> </a> </li> <li class="devsite-nav-item"> <a href="/gmail" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Gmail" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Gmail </span> </a> </li> <li class="devsite-nav-item"> <a href="/calendar" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Calendar" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Calendar </span> </a> </li> <li class="devsite-nav-item"> <a href="/workspace/chat" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Chat" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Chat </span> </a> </li> <li class="devsite-nav-item"> <a href="/classroom" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Classroom" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Classroom </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Docs" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Docs </span> </a> </li> <li class="devsite-nav-item"> <a href="/drive" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Drive" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Drive </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > </span> </span> </li> <li class="devsite-nav-item"> <a href="/forms" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Forms" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Forms </span> </a> </li> <li class="devsite-nav-item"> <a href="/keep" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Keep" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Keep </span> </a> </li> <li class="devsite-nav-item"> <a href="/meet" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Meet" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Meet </span> </a> </li> <li class="devsite-nav-item"> <a href="/sheets" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Sheets" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Sheets </span> </a> </li> <li class="devsite-nav-item"> <a href="/workspace/sites" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Sites" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Sites </span> </a> </li> <li class="devsite-nav-item"> <a href="/slides" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Slides" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Slides </span> </a> </li> <li class="devsite-nav-item"> <a href="/tasks" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Tasks" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Tasks </span> </a> </li> <li class="devsite-nav-item"> <a href="/vault" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Vault" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Vault </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Extend, automate & share </span> </span> </li> <li class="devsite-nav-item"> <a href="/workspace/add-ons" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Add-ons" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Add-ons </span> </a> </li> <li class="devsite-nav-item"> <a href="/apps-script" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Apps Script" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Apps Script </span> </a> </li> <li class="devsite-nav-item"> <a href="/workspace/chat/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Chat apps" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Chat apps </span> </a> </li> <li class="devsite-nav-item"> <a href="/drive/api/guides/about-apps" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Drive apps" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Drive apps </span> </a> </li> <li class="devsite-nav-item"> <a href="/workspace/marketplace" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Marketplace" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Marketplace </span> </a> </li> </ul> <ul class="devsite-nav-list" menu="Resources" aria-label="Side menu" hidden> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Tools </span> </span> </li> <li class="devsite-nav-item"> <a href="https://admin.google.com/" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Admin console" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Admin console </span> </a> </li> <li class="devsite-nav-item"> <a href="https://script.google.com/" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Apps Script dashboard" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Apps Script dashboard </span> </a> </li> <li class="devsite-nav-item"> <a href="https://console.cloud.google.com/workspace-api" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Cloud console" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Cloud console </span> </a> </li> <li class="devsite-nav-item"> <a href="/workspace/explore" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: APIs Explorer" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > APIs Explorer </span> </a> </li> <li class="devsite-nav-item"> <a href="https://addons.gsuite.google.com/uikit/builder" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Card Builder" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Card Builder </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Training & support </span> </span> </li> <li class="devsite-nav-item"> <a href="/workspace/guides/get-started" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: How to get started" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > How to get started </span> </a> </li> <li class="devsite-nav-item"> <a href="https://codelabs.developers.google.com/?product=googleworkspace" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Codelabs" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Codelabs </span> </a> </li> <li class="devsite-nav-item"> <a href="/workspace/support" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Developer support" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Developer support </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Updates </span> </span> </li> <li class="devsite-nav-item"> <a href="https://developers.googleblog.com/search/?query=Google+Workspace" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Blog" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Blog </span> </a> </li> <li class="devsite-nav-item"> <a href="/workspace/preview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Developer Previews" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Developer Previews </span> </a> </li> <li class="devsite-nav-item"> <a href="/workspace/newsletters" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Newsletter" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Newsletter </span> </a> </li> <li class="devsite-nav-item"> <a href="https://twitter.com/workspacedevs" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: X (Twitter)" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > X (Twitter) </span> </a> </li> <li class="devsite-nav-item"> <a href="https://www.youtube.com/channel/UCUcg6az6etU_gRtZVAhBXaw" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: YouTube" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > YouTube </span> </a> </li> </ul> </div> </div> </nav> </devsite-book-nav> <section id="gc-wrapper"> <main role="main" class="devsite-main-content" has-book-nav > <devsite-content> <article class="devsite-article"> <div class="devsite-article-meta nocontent" role="navigation"> <ul class="devsite-breadcrumb-list" aria-label="Breadcrumb"> <li class="devsite-breadcrumb-item "> <a href="https://developers.google.com/" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="" > Home </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developers.google.com/workspace" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail="Google Workspace" > Google Workspace </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developers.google.com/workspace/chat" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="3" track-type="globalNav" track-name="breadcrumb" track-metadata-position="3" track-metadata-eventdetail="Google Chat" > Google Chat </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developers.google.com/workspace/chat/api/reference" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="4" track-type="globalNav" track-name="breadcrumb" track-metadata-position="4" track-metadata-eventdetail="" > Reference </a> </li> </ul> <devsite-thumb-rating position="header"> </devsite-thumb-rating> </div> <devsite-feedback position="header" project-name="Google Chat" product-id="717201" bucket="google-chat" context="" version="t-devsite-webserver-20241114-r00-rc02.464922260396498922" data-label="Send Feedback Button" track-type="feedback" track-name="sendFeedbackLink" track-metadata-position="header" class="nocontent" project-feedback-url="https://issuetracker.google.com/issues/new?component=350158&template=1047215" project-icon="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v2/web-64dp/logo_chat_2023q4_color_1x_web_64dp.png" project-support-url="https://developers.google.com/workspace/chat/support" > <button> Send feedback </button> </devsite-feedback> <h1 class="devsite-page-title" tabindex="-1"> Cards v2 </h1> <devsite-feature-tooltip ack-key="AckCollectionsBookmarkTooltipDismiss" analytics-category="Site-Wide Custom Events" analytics-action-show="Callout Profile displayed" analytics-action-close="Callout Profile dismissed" analytics-label="Create Collection Callout" class="devsite-page-bookmark-tooltip nocontent" dismiss-button="true" id="devsite-collections-dropdown" dismiss-button-text="Dismiss" close-button-text="Got it"> <devsite-bookmark></devsite-bookmark> <span slot="popout-heading"> Stay organized with collections </span> <span slot="popout-contents"> Save and categorize content based on your preferences. </span> </devsite-feature-tooltip> <div class="devsite-page-title-meta"><devsite-view-release-notes></devsite-view-release-notes></div> <devsite-toc class="devsite-nav" depth="2" devsite-toc-embedded > </devsite-toc> <div class="devsite-article-body clearfix "> <section id="Message.Card_1"> <h3 id="card" data-text=" Card " tabindex="-1"> Card </h3> <section id="Message.Card_1.description"> <p> A card interface displayed in a Google Chat message or Google Workspace Add-on. </p> <p> Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use cards to present detailed information, gather information from users, and guide users to take a next step. </p> <p> </p> <p> Design and preview cards with the Card Builder. </p> <a class="button" href="https://addons.gsuite.google.com/uikit/builder">Open the Card Builder</a> <p> </p> <p> To learn how to build cards, see the following documentation: </p> <ul> <li> For Google Chat apps, see <a href="https://developers.google.com/workspace/chat/design-components-card-dialog">Design the components of a card or dialog</a>. </li> <li> For Google Workspace Add-ons, see <a href="https://developers.google.com/apps-script/add-ons/concepts/cards">Card-based interfaces</a>. </li> </ul> <p> <strong>Example: Card message for a Google Chat app</strong> </p> <p> <img " alt="Example contact card" src="https://developers.google.com/workspace/chat/images/card_api_reference.png"> </p> <p> To create the sample card message in Google Chat, use the following JSON: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">{ "cardsV2": [ { "cardId": "unique-card-id", "card": { "header": { "title": "Sasha", "subtitle": "Software Engineer", "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha" }, "sections": [ { "header": "Contact Info", "collapsible": true, "uncollapsibleWidgetsCount": 1, "widgets": [ { "decoratedText": { "startIcon": { "knownIcon": "EMAIL" }, "text": "sasha@example.com" } }, { "decoratedText": { "startIcon": { "knownIcon": "PERSON" }, "text": "<font color=\"#80e27e\">Online</font>" } }, { "decoratedText": { "startIcon": { "knownIcon": "PHONE" }, "text": "+1 (555) 555-1234" } }, { "buttonList": { "buttons": [ { "text": "Share", "onClick": { "openLink": { "url": "https://example.com/share" } } }, { "text": "Edit", "onClick": { "action": { "function": "goToView", "parameters": [ { "key": "viewType", "value": "EDIT" } ] } } } ] } } ] } ] } } ] } </code></pre> </section> <section id="Message.Card_1.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"header"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.CardHeader_1">CardHeader</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"sections"</span><span class="pun">: </span><span class="pun">[</span> <span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Section_1">Section</a></code>)</span> <span class="pun">}</span> <span class="pun">]</span><span class="pun">,</span> <span class="str">"sectionDividerStyle"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DividerStyle">DividerStyle</a></code>)</span><span class="pun">,</span> <span class="str">"cardActions"</span><span class="pun">: </span><span class="pun">[</span> <span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.CardAction_1">CardAction</a></code>)</span> <span class="pun">}</span> <span class="pun">]</span><span class="pun">,</span> <span class="str">"name"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"fixedFooter"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.CardFixedFooter">CardFixedFooter</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"displayStyle"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DisplayStyle">DisplayStyle</a></code>)</span><span class="pun">,</span> <span class="str">"peekCardHeader"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.CardHeader_1">CardHeader</a></code>)</span> <span class="pun">}</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Card_1.FIELDS"> <table class="properties responsive fixed" id="Message.Card_1.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.Card_1.FIELDS.header"> <td> <code translate="no" dir="ltr">header</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.CardHeader_1">CardHeader</a></code>)</code> </p> <p> The header of the card. A header usually contains a leading image and a title. Headers always appear at the top of a card. </p> </td> </tr> <tr id="Message.Card_1.FIELDS.sections"> <td> <code translate="no" dir="ltr">sections[]</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Section_1">Section</a></code>)</code> </p> <p> Contains a collection of widgets. Each section has its own, optional header. Sections are visually separated by a line divider. For an example in Google Chat apps, see <a href="https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card">Define a section of a card</a>. </p> </td> </tr> <tr id="Message.Card_1.FIELDS.section_divider_style"> <td> <code translate="no" dir="ltr">section<wbr/>Divider<wbr/>Style</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DividerStyle">DividerStyle</a></code>)</code> </p> <p> The divider style between the header, sections and footer. </p> </td> </tr> <tr id="Message.Card_1.FIELDS.card_actions"> <td> <code translate="no" dir="ltr">card<wbr/>Actions[]</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.CardAction_1">CardAction</a></code>)</code> </p> <p> The card's actions. Actions are added to the card's toolbar menu. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Workspace Add-ons and unavailable for Google Chat apps. </p> <p> For example, the following JSON constructs a card action menu with <code translate="no" dir="ltr">Settings</code> and <code translate="no" dir="ltr">Send Feedback</code> options: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"cardActions": [ { "actionLabel": "Settings", "onClick": { "action": { "functionName": "goToView", "parameters": [ { "key": "viewType", "value": "SETTING" } ], "loadIndicator": "LoadIndicator.SPINNER" } } }, { "actionLabel": "Send Feedback", "onClick": { "openLink": { "url": "https://example.com/feedback" } } } ] </code></pre> </td> </tr> <tr id="Message.Card_1.FIELDS.name"> <td> <code translate="no" dir="ltr">name</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> Name of the card. Used as a card identifier in card navigation. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Workspace Add-ons and unavailable for Google Chat apps. </p> </td> </tr> <tr id="Message.Card_1.FIELDS.fixed_footer"> <td> <code translate="no" dir="ltr">fixed<wbr/>Footer</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.CardFixedFooter">CardFixedFooter</a></code>)</code> </p> <p> The fixed footer shown at the bottom of this card. </p> <p> Setting <code translate="no" dir="ltr">fixedFooter</code> without specifying a <code translate="no" dir="ltr">primaryButton</code> or a <code translate="no" dir="ltr">secondaryButton</code> causes an error. For Chat apps, you can use fixed footers in <a href="https://developers.google.com/workspace/chat/dialogs">dialogs</a>, but not <a href="https://developers.google.com/workspace/chat/create-messages#create">card messages</a>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </td> </tr> <tr id="Message.Card_1.FIELDS.display_style"> <td> <code translate="no" dir="ltr">display<wbr/>Style</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DisplayStyle">DisplayStyle</a></code>)</code> </p> <p> In Google Workspace Add-ons, sets the display properties of the <code translate="no" dir="ltr">peekCardHeader</code>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Workspace Add-ons and unavailable for Google Chat apps. </p> </td> </tr> <tr id="Message.Card_1.FIELDS.peek_card_header"> <td> <code translate="no" dir="ltr">peek<wbr/>Card<wbr/>Header</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.CardHeader_1">CardHeader</a></code>)</code> </p> <p> When displaying contextual content, the peek card header acts as a placeholder so that the user can navigate forward between the homepage cards and the contextual cards. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Workspace Add-ons and unavailable for Google Chat apps. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.CardHeader_1"> <h3 id="cardheader" data-text=" CardHeader " tabindex="-1"> CardHeader </h3> <section id="Message.CardHeader_1.description"> <p> Represents a card header. For an example in Google Chat apps, see <a href="https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_header">Add a header</a>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.CardHeader_1.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"title"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"subtitle"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"imageType"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ImageType">ImageType</a></code>)</span><span class="pun">,</span> <span class="str">"imageUrl"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"imageAltText"</span><span class="pun">: </span><span class="kwd">string</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.CardHeader_1.FIELDS"> <table class="properties responsive fixed" id="Message.CardHeader_1.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.CardHeader_1.FIELDS.title"> <td> <code translate="no" dir="ltr">title</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> Required. The title of the card header. The header has a fixed height: if both a title and subtitle are specified, each takes up one line. If only the title is specified, it takes up both lines. </p> </td> </tr> <tr id="Message.CardHeader_1.FIELDS.subtitle"> <td> <code translate="no" dir="ltr">subtitle</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The subtitle of the card header. If specified, appears on its own line below the <code translate="no" dir="ltr">title</code>. </p> </td> </tr> <tr id="Message.CardHeader_1.FIELDS.image_type"> <td> <code translate="no" dir="ltr">image<wbr/>Type</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ImageType">ImageType</a></code>)</code> </p> <p> The shape used to crop the image. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </td> </tr> <tr id="Message.CardHeader_1.FIELDS.image_url"> <td> <code translate="no" dir="ltr">image<wbr/>Url</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The HTTPS URL of the image in the card header. </p> </td> </tr> <tr id="Message.CardHeader_1.FIELDS.image_alt_text"> <td> <code translate="no" dir="ltr">image<wbr/>Alt<wbr/>Text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The alternative text of this image that's used for accessibility. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.ImageType"> <h3 id="imagetype" data-text=" ImageType " tabindex="-1"> ImageType </h3> <section id="Message.ImageType.description"> <p> The shape used to crop the image. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.ImageType.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.ImageType.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.ImageType.ENUM_VALUES.SQUARE"> <td> <code class="apitype" translate="no" dir="ltr">SQUARE</code> </td> <td> Default value. Applies a square mask to the image. For example, a 4x3 image becomes 3x3. </td> </tr> <tr id="Message.ImageType.ENUM_VALUES.CIRCLE"> <td> <code class="apitype" translate="no" dir="ltr">CIRCLE</code> </td> <td> Applies a circular mask to the image. For example, a 4x3 image becomes a circle with a diameter of 3. </td> </tr> </tbody> </table> </section> </section><section id="Message.Section_1"> <h3 id="section" data-text=" Section " tabindex="-1"> Section </h3> <section id="Message.Section_1.description"> <p> A section contains a collection of widgets that are rendered vertically in the order that they're specified. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.Section_1.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"header"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"widgets"</span><span class="pun">: </span><span class="pun">[</span> <span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Widget">Widget</a></code>)</span> <span class="pun">}</span> <span class="pun">]</span><span class="pun">,</span> <span class="str">"collapsible"</span><span class="pun">: </span><span class="kwd">boolean</span><span class="pun">,</span> <span class="str">"uncollapsibleWidgetsCount"</span><span class="pun">: </span><span class="kwd">integer</span><span class="pun">,</span> <span class="str">"collapseControl"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.CollapseControl">CollapseControl</a></code>)</span> <span class="pun">}</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Section_1.FIELDS"> <table class="properties responsive fixed" id="Message.Section_1.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.Section_1.FIELDS.header"> <td> <code translate="no" dir="ltr">header</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see <a href="https://developers.google.com/workspace/chat/format-messages#card-formatting">Formatting text in Google Chat apps</a> and <a href="https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting">Formatting text in Google Workspace Add-ons</a>. </p> </td> </tr> <tr id="Message.Section_1.FIELDS.widgets"> <td> <code translate="no" dir="ltr">widgets[]</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Widget">Widget</a></code>)</code> </p> <p> All the widgets in the section. Must contain at least one widget. </p> </td> </tr> <tr id="Message.Section_1.FIELDS.collapsible"> <td> <code translate="no" dir="ltr">collapsible</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">boolean</code> </p> <p> Indicates whether this section is collapsible. </p> <p> Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking <strong>Show more</strong>. Users can hide the widgets again by clicking <strong>Show less</strong>. </p> <p> To determine which widgets are hidden, specify <code translate="no" dir="ltr">uncollapsibleWidgetsCount</code>. </p> </td> </tr> <tr id="Message.Section_1.FIELDS.uncollapsible_widgets_count"> <td> <code translate="no" dir="ltr">uncollapsible<wbr/>Widgets<wbr/>Count</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">integer</code> </p> <p> The number of uncollapsible widgets which remain visible even when a section is collapsed. </p> <p> For example, when a section contains five widgets and the <code translate="no" dir="ltr">uncollapsibleWidgetsCount</code> is set to <code translate="no" dir="ltr">2</code>, the first two widgets are always shown and the last three are collapsed by default. The <code translate="no" dir="ltr">uncollapsibleWidgetsCount</code> is taken into account only when <code translate="no" dir="ltr">collapsible</code> is <code translate="no" dir="ltr">true</code>. </p> </td> </tr> <tr id="Message.Section_1.FIELDS.collapse_control"> <td> <code translate="no" dir="ltr">collapse<wbr/>Control</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.CollapseControl">CollapseControl</a></code>)</code> </p> <p> Optional. Define the expand and collapse button of the section. This button will be shown only if the section is collapsible. If this field isn't set, the default button is used. <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.Widget"> <h3 id="widget" data-text=" Widget " tabindex="-1"> Widget </h3> <section id="Message.Widget.description"> <p> Each card is made up of widgets. </p> <p> A widget is a composite object that can represent one of text, images, buttons, and other object types. </p> </section> <section id="Message.Widget.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"horizontalAlignment"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.HorizontalAlignment">HorizontalAlignment</a></code>)</span><span class="pun">,</span> <span class="com">// Union field <code translate="no" dir="ltr">data</code> can be only one of the following:</span> <span class="str">"textParagraph"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.TextParagraph_1">TextParagraph</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"image"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Image_1">Image</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"decoratedText"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DecoratedText">DecoratedText</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"buttonList"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ButtonList">ButtonList</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"textInput"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.TextInput">TextInput</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"selectionInput"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SelectionInput">SelectionInput</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"dateTimePicker"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DateTimePicker">DateTimePicker</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"divider"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Divider">Divider</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"grid"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Grid">Grid</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"columns"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Columns">Columns</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"chipList"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ChipList">ChipList</a></code>)</span> <span class="pun">}</span> <span class="com">// End of list of possible types for union field <code translate="no" dir="ltr">data</code>.</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Widget.FIELDS"> <table class="properties responsive fixed" id="Message.Widget.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.Widget.FIELDS.horizontal_alignment"> <td> <code translate="no" dir="ltr">horizontal<wbr/>Alignment</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.HorizontalAlignment">HorizontalAlignment</a></code>)</code> </p> <p> Specifies whether widgets align to the left, right, or center of a column. </p> </td> </tr> <tr class="alt" id="Message.Widget.FIELDS.oneof_data"> <td colspan="2"> Union field <code translate="no" dir="ltr">data</code>. A widget can only have one of the following items. You can use multiple widget fields to display more items. <code translate="no" dir="ltr">data</code> can be only one of the following: </td> </tr> <tr id="Message.Widget.FIELDS.text_paragraph"> <td> <code translate="no" dir="ltr">text<wbr/>Paragraph</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.TextParagraph_1">TextParagraph</a></code>)</code> </p> <p> Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see <a href="https://developers.google.com/workspace/chat/format-messages#card-formatting">Formatting text in Google Chat apps</a> and <a href="https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting">Formatting text in Google Workspace Add-ons</a>. </p> <p> For example, the following JSON creates a bolded text: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"textParagraph": { "text": " <b>bold text</b>" } </code></pre> </td> </tr> <tr id="Message.Widget.FIELDS.image"> <td> <code translate="no" dir="ltr">image</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Image_1">Image</a></code>)</code> </p> <p> Displays an image. </p> <p> For example, the following JSON creates an image with alternative text: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } </code></pre> </td> </tr> <tr id="Message.Widget.FIELDS.decorated_text"> <td> <code translate="no" dir="ltr">decorated<wbr/>Text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DecoratedText">DecoratedText</a></code>)</code> </p> <p> Displays a decorated text item. </p> <p> For example, the following JSON creates a decorated text widget showing email address: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"decoratedText": { "icon": { "knownIcon": "EMAIL" }, "topLabel": "Email Address", "text": "sasha@example.com", "bottomLabel": "This is a new Email address!", "switchControl": { "name": "has_send_welcome_email_to_sasha", "selected": false, "controlType": "CHECKBOX" } } </code></pre> </td> </tr> <tr id="Message.Widget.FIELDS.button_list"> <td> <code translate="no" dir="ltr">button<wbr/>List</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ButtonList">ButtonList</a></code>)</code> </p> <p> A list of buttons. </p> <p> For example, the following JSON creates two buttons. The first is a blue text button and the second is an image button that opens a link: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"buttonList": { "buttons": [ { "text": "Edit", "color": { "red": 0, "green": 0, "blue": 1, }, "disabled": true, }, { "icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] } </code></pre> </td> </tr> <tr id="Message.Widget.FIELDS.text_input"> <td> <code translate="no" dir="ltr">text<wbr/>Input</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.TextInput">TextInput</a></code>)</code> </p> <p> Displays a text box that users can type into. </p> <p> For example, the following JSON creates a text input for an email address: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"textInput": { "name": "mailing_address", "label": "Mailing Address" } </code></pre> <p> As another example, the following JSON creates a text input for a programming language with static suggestions: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"textInput": { "name": "preferred_programing_language", "label": "Preferred Language", "initialSuggestions": { "items": [ { "text": "C++" }, { "text": "Java" }, { "text": "JavaScript" }, { "text": "Python" } ] } } </code></pre> </td> </tr> <tr id="Message.Widget.FIELDS.selection_input"> <td> <code translate="no" dir="ltr">selection<wbr/>Input</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SelectionInput">SelectionInput</a></code>)</code> </p> <p> Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. </p> <p> For example, the following JSON creates a dropdown menu that lets users choose a size: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } </code></pre> </td> </tr> <tr id="Message.Widget.FIELDS.date_time_picker"> <td> <code translate="no" dir="ltr">date<wbr/>Time<wbr/>Picker</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DateTimePicker">DateTimePicker</a></code>)</code> </p> <p> Displays a widget that lets users input a date, time, or date and time. </p> <p> For example, the following JSON creates a date time picker to schedule an appointment: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": "796435200000" } </code></pre> </td> </tr> <tr id="Message.Widget.FIELDS.divider"> <td> <code translate="no" dir="ltr">divider</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Divider">Divider</a></code>)</code> </p> <p> Displays a horizontal line divider between widgets. </p> <p> For example, the following JSON creates a divider: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"divider": { } </code></pre> </td> </tr> <tr id="Message.Widget.FIELDS.grid"> <td> <code translate="no" dir="ltr">grid</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Grid">Grid</a></code>)</code> </p> <p> Displays a grid with a collection of items. </p> <p> A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> <p> For example, the following JSON creates a 2 column grid with a single item: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } </code></pre> </td> </tr> <tr id="Message.Widget.FIELDS.columns"> <td> <code translate="no" dir="ltr">columns</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Columns">Columns</a></code>)</code> </p> <p> Displays up to 2 columns. </p> <p> To include more than 2 columns, or to use rows, use the <code translate="no" dir="ltr">Grid</code> widget. </p> <p> For example, the following JSON creates 2 columns that each contain text paragraphs: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"columns": { "columnItems": [ { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", "horizontalAlignment": "CENTER", "verticalAlignment": "CENTER", "widgets": [ { "textParagraph": { "text": "First column text paragraph" } } ] }, { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", "horizontalAlignment": "CENTER", "verticalAlignment": "CENTER", "widgets": [ { "textParagraph": { "text": "Second column text paragraph" } } ] } ] } </code></pre> </td> </tr> <tr id="Message.Widget.FIELDS.chip_list"> <td> <code translate="no" dir="ltr">chip<wbr/>List</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ChipList">ChipList</a></code>)</code> </p> <p> A list of chips. </p> <p> For example, the following JSON creates two chips. The first is a text chip and the second is an icon chip that opens a link: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"chipList": { "chips": [ { "text": "Edit", "disabled": true, }, { "icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] } </code></pre> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.TextParagraph_1"> <h3 id="textparagraph" data-text=" TextParagraph " tabindex="-1"> TextParagraph </h3> <section id="Message.TextParagraph_1.description"> <p> A paragraph of text that supports formatting. For an example in Google Chat apps, see <a href="https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_a_paragraph_of_formatted_text">Add a paragraph of formatted text</a>. For more information about formatting text, see <a href="https://developers.google.com/workspace/chat/format-messages#card-formatting">Formatting text in Google Chat apps</a> and <a href="https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting">Formatting text in Google Workspace Add-ons</a>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.TextParagraph_1.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"text"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"maxLines"</span><span class="pun">: </span><span class="kwd">integer</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.TextParagraph_1.FIELDS"> <table class="properties responsive fixed" id="Message.TextParagraph_1.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.TextParagraph_1.FIELDS.text"> <td> <code translate="no" dir="ltr">text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The text that's shown in the widget. </p> </td> </tr> <tr id="Message.TextParagraph_1.FIELDS.max_lines"> <td> <code translate="no" dir="ltr">max<wbr/>Lines</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">integer</code> </p> <p> The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a <strong>show more</strong> button. If the text is equal or shorter than the specified maximum number of lines, a <strong>show more</strong> button isn't displayed. </p> <p> The default value is 0, in which case all context is displayed. Negative values are ignored. <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.Image_1"> <h3 id="image" data-text=" Image " tabindex="-1"> Image </h3> <section id="Message.Image_1.description"> <p> An image that is specified by a URL and can have an <code translate="no" dir="ltr">onClick</code> action. For an example, see <a href="https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_image">Add an image</a>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.Image_1.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"imageUrl"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"onClick"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClick_1">OnClick</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"altText"</span><span class="pun">: </span><span class="kwd">string</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Image_1.FIELDS"> <table class="properties responsive fixed" id="Message.Image_1.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.Image_1.FIELDS.image_url"> <td> <code translate="no" dir="ltr">image<wbr/>Url</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The HTTPS URL that hosts the image. </p> <p> For example: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png </code></pre> </td> </tr> <tr id="Message.Image_1.FIELDS.on_click"> <td> <code translate="no" dir="ltr">on<wbr/>Click</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClick_1">OnClick</a></code>)</code> </p> <p> When a user clicks the image, the click triggers this action. </p> </td> </tr> <tr id="Message.Image_1.FIELDS.alt_text"> <td> <code translate="no" dir="ltr">alt<wbr/>Text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The alternative text of this image that's used for accessibility. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.OnClick_1"> <h3 id="onclick" data-text=" OnClick " tabindex="-1"> OnClick </h3> <section id="Message.OnClick_1.description"> <p> Represents how to respond when users click an interactive element on a card, such as a button. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.OnClick_1.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="com">// Union field <code translate="no" dir="ltr">data</code> can be only one of the following:</span> <span class="str">"action"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"openLink"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OpenLink_1">OpenLink</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"openDynamicLinkAction"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"card"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Card_1">Card</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"overflowMenu"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OverflowMenu">OverflowMenu</a></code>)</span> <span class="pun">}</span> <span class="com">// End of list of possible types for union field <code translate="no" dir="ltr">data</code>.</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.OnClick_1.FIELDS"> <table class="properties responsive fixed" id="Message.OnClick_1.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr class="alt" id="Message.OnClick_1.FIELDS.oneof_data"> <td colspan="2"> <p> Union field <code translate="no" dir="ltr">data</code>. </p> <p> <code translate="no" dir="ltr">data</code> can be only one of the following: </p> </td> </tr> <tr id="Message.OnClick_1.FIELDS.action"> <td> <code translate="no" dir="ltr">action</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</code> </p> <p> If specified, an action is triggered by this <code translate="no" dir="ltr">onClick</code>. </p> </td> </tr> <tr id="Message.OnClick_1.FIELDS.open_link"> <td> <code translate="no" dir="ltr">open<wbr/>Link</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OpenLink_1">OpenLink</a></code>)</code> </p> <p> If specified, this <code translate="no" dir="ltr">onClick</code> triggers an open link action. </p> </td> </tr> <tr id="Message.OnClick_1.FIELDS.open_dynamic_link_action"> <td> <code translate="no" dir="ltr">open<wbr/>Dynamic<wbr/>Link<wbr/>Action</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</code> </p> <p> An add-on triggers this action when the action needs to open a link. This differs from the <code translate="no" dir="ltr">openLink</code> 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. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Workspace Add-ons and unavailable for Google Chat apps. </p> </td> </tr> <tr id="Message.OnClick_1.FIELDS.card"> <td> <code translate="no" dir="ltr">card</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Card_1">Card</a></code>)</code> </p> <p> A new card is pushed to the card stack after clicking if specified. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Workspace Add-ons and unavailable for Google Chat apps. </p> </td> </tr> <tr id="Message.OnClick_1.FIELDS.overflow_menu"> <td> <code translate="no" dir="ltr">overflow<wbr/>Menu</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OverflowMenu">OverflowMenu</a></code>)</code> </p> <p> If specified, this <code translate="no" dir="ltr">onClick</code> opens an overflow menu. <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.Action"> <h3 id="action" data-text=" Action " tabindex="-1"> Action </h3> <section id="Message.Action.description"> <p> 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. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.Action.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"function"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"parameters"</span><span class="pun">: </span><span class="pun">[</span> <span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ActionParameter_1">ActionParameter</a></code>)</span> <span class="pun">}</span> <span class="pun">]</span><span class="pun">,</span> <span class="str">"loadIndicator"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.LoadIndicator">LoadIndicator</a></code>)</span><span class="pun">,</span> <span class="str">"persistValues"</span><span class="pun">: </span><span class="kwd">boolean</span><span class="pun">,</span> <span class="str">"interaction"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Interaction">Interaction</a></code>)</span><span class="pun">,</span> <span class="str">"requiredWidgets"</span><span class="pun">: </span><span class="pun">[</span> <span class="kwd">string</span> <span class="pun">]</span><span class="pun">,</span> <span class="str">"allWidgetsAreRequired"</span><span class="pun">: </span><span class="kwd">boolean</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Action.FIELDS"> <table class="properties responsive fixed" id="Message.Action.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.Action.FIELDS.function"> <td> <code translate="no" dir="ltr">function</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> A custom function to invoke when the containing element is clicked or otherwise activated. </p> <p> For example usage, see <a href="https://developers.google.com/workspace/chat/read-form-data">Read form data</a>. </p> </td> </tr> <tr id="Message.Action.FIELDS.parameters"> <td> <code translate="no" dir="ltr">parameters[]</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ActionParameter_1">ActionParameter</a></code>)</code> </p> <p> List of action parameters. </p> </td> </tr> <tr id="Message.Action.FIELDS.load_indicator"> <td> <code translate="no" dir="ltr">load<wbr/>Indicator</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.LoadIndicator">LoadIndicator</a></code>)</code> </p> <p> Specifies the loading indicator that the action displays while making the call to the action. </p> </td> </tr> <tr id="Message.Action.FIELDS.persist_values"> <td> <code translate="no" dir="ltr">persist<wbr/>Values</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">boolean</code> </p> <p> Indicates whether form values persist after the action. The default value is <code translate="no" dir="ltr">false</code>. </p> <p> If <code translate="no" dir="ltr">true</code>, form values remain after the action is triggered. To let the user make changes while the action is being processed, set <a href="https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator"><code translate="no" dir="ltr">LoadIndicator</code></a> to <code translate="no" dir="ltr">NONE</code>. For <a href="https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create">card messages</a> in Chat apps, you must also set the action's <a href="https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype"><code translate="no" dir="ltr">ResponseType</code></a> to <code translate="no" dir="ltr">UPDATE_MESSAGE</code> and use the same <a href="https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId"><code translate="no" dir="ltr">cardId</code></a> from the card that contained the action. </p> <p> If <code translate="no" dir="ltr">false</code>, the form values are cleared when the action is triggered. To prevent the user from making changes while the action is being processed, set <a href="https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator"><code translate="no" dir="ltr">LoadIndicator</code></a> to <code translate="no" dir="ltr">SPINNER</code>. </p> </td> </tr> <tr id="Message.Action.FIELDS.interaction"> <td> <code translate="no" dir="ltr">interaction</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Interaction">Interaction</a></code>)</code> </p> <p> Optional. Required when opening a <a href="https://developers.google.com/workspace/chat/dialogs">dialog</a>. </p> <p> What to do in response to an interaction with a user, such as a user clicking a button in a card message. </p> <p> If unspecified, the app responds by executing an <code translate="no" dir="ltr">action</code> —like opening a link or running a function—as normal. </p> <p> By specifying an <code translate="no" dir="ltr">interaction</code>, the app can respond in special interactive ways. For example, by setting <code translate="no" dir="ltr">interaction</code> to <code translate="no" dir="ltr">OPEN_DIALOG</code>, the app can open a <a href="https://developers.google.com/workspace/chat/dialogs">dialog</a>. 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. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </td> </tr> <tr id="Message.Action.FIELDS.required_widgets"> <td> <code translate="no" dir="ltr">required<wbr/>Widgets[]</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> </p> <aside class="preview"> <strong>Developer Preview:</strong> Available as part of the <a class="external" href="https://developers.google.com/workspace/preview" target="_blank">Google Workspace Developer Preview Program</a>, which grants early access to certain features. </aside> Optional. Fill this list with the names of widgets that this Action needs for a valid submission. <p> </p> <p> If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </td> </tr> <tr id="Message.Action.FIELDS.all_widgets_are_required"> <td> <code translate="no" dir="ltr">all<wbr/>Widgets<wbr/>Are<wbr/>Required</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">boolean</code> </p> <p> </p> <aside class="preview"> <strong>Developer Preview:</strong> Available as part of the <a class="external" href="https://developers.google.com/workspace/preview" target="_blank">Google Workspace Developer Preview Program</a>, which grants early access to certain features. </aside> Optional. If this is true, then all widgets are considered required by this action. <p> </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.ActionParameter_1"> <h3 id="actionparameter" data-text=" ActionParameter " tabindex="-1"> ActionParameter </h3> <section id="Message.ActionParameter_1.description"> <p> List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use <code translate="no" dir="ltr">action method = snooze()</code>, passing the snooze type and snooze time in the list of string parameters. </p> <p> To learn more, see <a href="https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject"><code translate="no" dir="ltr">CommonEventObject</code></a>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.ActionParameter_1.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"key"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"value"</span><span class="pun">: </span><span class="kwd">string</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.ActionParameter_1.FIELDS"> <table class="properties responsive fixed" id="Message.ActionParameter_1.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.ActionParameter_1.FIELDS.key"> <td> <code translate="no" dir="ltr">key</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The name of the parameter for the action script. </p> </td> </tr> <tr id="Message.ActionParameter_1.FIELDS.value"> <td> <code translate="no" dir="ltr">value</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The value of the parameter. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.LoadIndicator"> <h3 id="loadindicator" data-text=" LoadIndicator " tabindex="-1"> LoadIndicator </h3> <section id="Message.LoadIndicator.description"> <p> Specifies the loading indicator that the action displays while making the call to the action. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.LoadIndicator.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.LoadIndicator.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.LoadIndicator.ENUM_VALUES.SPINNER"> <td> <code class="apitype" translate="no" dir="ltr">SPINNER</code> </td> <td> Displays a spinner to indicate that content is loading. </td> </tr> <tr id="Message.LoadIndicator.ENUM_VALUES.NONE"> <td> <code class="apitype" translate="no" dir="ltr">NONE</code> </td> <td> Nothing is displayed. </td> </tr> </tbody> </table> </section> </section><section id="Message.Interaction"> <h3 id="interaction" data-text=" Interaction " tabindex="-1"> Interaction </h3> <section id="Message.Interaction.description"> <p> Optional. Required when opening a <a href="https://developers.google.com/workspace/chat/dialogs">dialog</a>. </p> <p> What to do in response to an interaction with a user, such as a user clicking a button in a card message. </p> <p> If unspecified, the app responds by executing an <code translate="no" dir="ltr">action</code> —like opening a link or running a function—as normal. </p> <p> By specifying an <code translate="no" dir="ltr">interaction</code>, the app can respond in special interactive ways. For example, by setting <code translate="no" dir="ltr">interaction</code> to <code translate="no" dir="ltr">OPEN_DIALOG</code>, the app can open a <a href="https://developers.google.com/workspace/chat/dialogs">dialog</a>. </p> <p> 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. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </section> <section id="Message.Interaction.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.Interaction.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.Interaction.ENUM_VALUES.INTERACTION_UNSPECIFIED"> <td> <code class="apitype" translate="no" dir="ltr">INTERACTION_UNSPECIFIED</code> </td> <td> Default value. The <code translate="no" dir="ltr">action</code> executes as normal. </td> </tr> <tr id="Message.Interaction.ENUM_VALUES.OPEN_DIALOG"> <td> <code class="apitype" translate="no" dir="ltr">OPEN_DIALOG</code> </td> <td> <p> Opens a <a href="https://developers.google.com/workspace/chat/dialogs">dialog</a>, a windowed, card-based interface that Chat apps use to interact with users. </p> <p> Only supported by Chat apps in response to button-clicks on card messages. If specified for an add-on, the entire card is stripped and nothing is shown in the client. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.OpenLink_1"> <h3 id="openlink" data-text=" OpenLink " tabindex="-1"> OpenLink </h3> <section id="Message.OpenLink_1.description"> <p> Represents an <code translate="no" dir="ltr">onClick</code> event that opens a hyperlink. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.OpenLink_1.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"url"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"openAs"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OpenAs">OpenAs</a></code>)</span><span class="pun">,</span> <span class="str">"onClose"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClose">OnClose</a></code>)</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.OpenLink_1.FIELDS"> <table class="properties responsive fixed" id="Message.OpenLink_1.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.OpenLink_1.FIELDS.url"> <td> <code translate="no" dir="ltr">url</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The URL to open. </p> </td> </tr> <tr id="Message.OpenLink_1.FIELDS.open_as"> <td> <code translate="no" dir="ltr">open<wbr/>As</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OpenAs">OpenAs</a></code>)</code> </p> <p> How to open a link. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Workspace Add-ons and unavailable for Google Chat apps. </p> </td> </tr> <tr id="Message.OpenLink_1.FIELDS.on_close"> <td> <code translate="no" dir="ltr">on<wbr/>Close</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClose">OnClose</a></code>)</code> </p> <p> Whether the client forgets about a link after opening it, or observes it until the window closes. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Workspace Add-ons and unavailable for Google Chat apps. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.OpenAs"> <h3 id="openas" data-text=" OpenAs " tabindex="-1"> OpenAs </h3> <section id="Message.OpenAs.description"> <p> When an <code translate="no" dir="ltr">OnClick</code> action opens a link, then the client can either open it as a full-size window (if that's the frame used by the client), or an overlay (such as a pop-up). The implementation depends on the client platform capabilities, and the value selected might be ignored if the client doesn't support it. <code translate="no" dir="ltr">FULL_SIZE</code> is supported by all clients. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Workspace Add-ons and unavailable for Google Chat apps. </p> </section> <section id="Message.OpenAs.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.OpenAs.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.OpenAs.ENUM_VALUES.FULL_SIZE"> <td> <code class="apitype" translate="no" dir="ltr">FULL_SIZE</code> </td> <td> The link opens as a full-size window (if that's the frame used by the client). </td> </tr> <tr id="Message.OpenAs.ENUM_VALUES.OVERLAY"> <td> <code class="apitype" translate="no" dir="ltr">OVERLAY</code> </td> <td> The link opens as an overlay, such as a pop-up. </td> </tr> </tbody> </table> </section> </section><section id="Message.OnClose"> <h3 id="onclose" data-text=" OnClose " tabindex="-1"> OnClose </h3> <section id="Message.OnClose.description"> <p> What the client does when a link opened by an <code translate="no" dir="ltr">OnClick</code> action is closed. </p> <p> Implementation depends on client platform capabilities. For example, a web browser might open a link in a pop-up window with an <code translate="no" dir="ltr">OnClose</code> handler. </p> <p> If both <code translate="no" dir="ltr">OnOpen</code> and <code translate="no" dir="ltr">OnClose</code> handlers are set, and the client platform can't support both values, <code translate="no" dir="ltr">OnClose</code> takes precedence. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Workspace Add-ons and unavailable for Google Chat apps. </p> </section> <section id="Message.OnClose.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.OnClose.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.OnClose.ENUM_VALUES.NOTHING"> <td> <code class="apitype" translate="no" dir="ltr">NOTHING</code> </td> <td> Default value. The card doesn't reload; nothing happens. </td> </tr> <tr id="Message.OnClose.ENUM_VALUES.RELOAD"> <td> <code class="apitype" translate="no" dir="ltr">RELOAD</code> </td> <td> <p> Reloads the card after the child window closes. </p> <p> If used in conjunction with <a href="https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#openas"><code translate="no" dir="ltr">OpenAs.OVERLAY</code></a>, the child window acts as a modal dialog and the parent card is blocked until the child window closes. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.OverflowMenu"> <h3 id="overflowmenu" data-text=" OverflowMenu " tabindex="-1"> OverflowMenu </h3> <section id="Message.OverflowMenu.description"> <p> A widget that presents a pop-up menu with one or more actions that users can invoke. For example, showing non-primary actions in a card. You can use this widget when actions don't fit in the available space. To use, specify this widget in the <code translate="no" dir="ltr">OnClick</code> action of widgets that support it. For example, in a <code translate="no" dir="ltr">Button</code>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </section> <section id="Message.OverflowMenu.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"items"</span><span class="pun">: </span><span class="pun">[</span> <span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OverflowMenuItem">OverflowMenuItem</a></code>)</span> <span class="pun">}</span> <span class="pun">]</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.OverflowMenu.FIELDS"> <table class="properties responsive fixed" id="Message.OverflowMenu.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.OverflowMenu.FIELDS.items"> <td> <code translate="no" dir="ltr">items[]</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OverflowMenuItem">OverflowMenuItem</a></code>)</code> </p> <p> Required. The list of menu options. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.OverflowMenuItem"> <h3 id="overflowmenuitem" data-text=" OverflowMenuItem " tabindex="-1"> OverflowMenuItem </h3> <section id="Message.OverflowMenuItem.description"> <p> An option that users can invoke in an overflow menu. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </section> <section id="Message.OverflowMenuItem.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"startIcon"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Icon_1">Icon</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"text"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"onClick"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClick_1">OnClick</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"disabled"</span><span class="pun">: </span><span class="kwd">boolean</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.OverflowMenuItem.FIELDS"> <table class="properties responsive fixed" id="Message.OverflowMenuItem.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.OverflowMenuItem.FIELDS.start_icon"> <td> <code translate="no" dir="ltr">start<wbr/>Icon</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Icon_1">Icon</a></code>)</code> </p> <p> The icon displayed in front of the text. </p> </td> </tr> <tr id="Message.OverflowMenuItem.FIELDS.text"> <td> <code translate="no" dir="ltr">text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> Required. The text that identifies or describes the item to users. </p> </td> </tr> <tr id="Message.OverflowMenuItem.FIELDS.on_click"> <td> <code translate="no" dir="ltr">on<wbr/>Click</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClick_1">OnClick</a></code>)</code> </p> <p> Required. The action invoked when a menu option is selected. This <code translate="no" dir="ltr">OnClick</code> cannot contain an <code translate="no" dir="ltr">OverflowMenu</code>, any specified <code translate="no" dir="ltr">OverflowMenu</code> is dropped and the menu item disabled. </p> </td> </tr> <tr id="Message.OverflowMenuItem.FIELDS.disabled"> <td> <code translate="no" dir="ltr">disabled</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">boolean</code> </p> <p> Whether the menu option is disabled. Defaults to false. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.Icon_1"> <h3 id="icon" data-text=" Icon " tabindex="-1"> Icon </h3> <section id="Message.Icon_1.description"> <p> An icon displayed in a widget on a card. For an example in Google Chat apps, see <a href="https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_icon">Add an icon</a>. </p> <p> Supports <a href="https://developers.google.com/workspace/chat/format-messages#builtinicons">built-in</a> and <a href="https://developers.google.com/workspace/chat/format-messages#customicons">custom</a> icons. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.Icon_1.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"altText"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"imageType"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ImageType">ImageType</a></code>)</span><span class="pun">,</span> <span class="com">// Union field <code translate="no" dir="ltr">icons</code> can be only one of the following:</span> <span class="str">"knownIcon"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"iconUrl"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"materialIcon"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.MaterialIcon">MaterialIcon</a></code>)</span> <span class="pun">}</span> <span class="com">// End of list of possible types for union field <code translate="no" dir="ltr">icons</code>.</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Icon_1.FIELDS"> <table class="properties responsive fixed" id="Message.Icon_1.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.Icon_1.FIELDS.alt_text"> <td> <code translate="no" dir="ltr">alt<wbr/>Text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> Optional. A description of the icon used for accessibility. If unspecified, the default value <code translate="no" dir="ltr">Button</code> is provided. As a best practice, you should set a helpful description for what the icon displays, and if applicable, what it does. For example, <code translate="no" dir="ltr">A user's account portrait</code>, or <code translate="no" dir="ltr">Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat</code>. </p> <p> If the icon is set in a <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Button_1"><code translate="no" dir="ltr">Button</code></a></code>, the <code translate="no" dir="ltr">altText</code> appears as helper text when the user hovers over the button. However, if the button also sets <code translate="no" dir="ltr">text</code>, the icon's <code translate="no" dir="ltr">altText</code> is ignored. </p> </td> </tr> <tr id="Message.Icon_1.FIELDS.image_type"> <td> <code translate="no" dir="ltr">image<wbr/>Type</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ImageType">ImageType</a></code>)</code> </p> <p> The crop style applied to the image. In some cases, applying a <code translate="no" dir="ltr">CIRCLE</code> crop causes the image to be drawn larger than a built-in icon. </p> </td> </tr> <tr class="alt" id="Message.Icon_1.FIELDS.oneof_icons"> <td colspan="2"> Union field <code translate="no" dir="ltr">icons</code>. The icon displayed in the widget on the card. <code translate="no" dir="ltr">icons</code> can be only one of the following: </td> </tr> <tr id="Message.Icon_1.FIELDS.known_icon"> <td> <code translate="no" dir="ltr">known<wbr/>Icon</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> Display one of the built-in icons provided by Google Workspace. </p> <p> For example, to display an airplane icon, specify <code translate="no" dir="ltr">AIRPLANE</code>. For a bus, specify <code translate="no" dir="ltr">BUS</code>. </p> <p> For a full list of supported icons, see <a href="https://developers.google.com/workspace/chat/format-messages#builtinicons">built-in icons</a>. </p> </td> </tr> <tr id="Message.Icon_1.FIELDS.icon_url"> <td> <code translate="no" dir="ltr">icon<wbr/>Url</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> Display a custom icon hosted at an HTTPS URL. </p> <p> For example: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"iconUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png" </code></pre> <p> Supported file types include <code translate="no" dir="ltr">.png</code> and <code translate="no" dir="ltr">.jpg</code>. </p> </td> </tr> <tr id="Message.Icon_1.FIELDS.material_icon"> <td> <code translate="no" dir="ltr">material<wbr/>Icon</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.MaterialIcon">MaterialIcon</a></code>)</code> </p> <p> Display one of the <a href="https://fonts.google.com/icons">Google Material Icons</a>. </p> <p> For example, to display a <a href="https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048">checkbox icon</a>, use </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"materialIcon": { "name": "check_box" } </code></pre> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.MaterialIcon"> <h3 id="materialicon" data-text=" MaterialIcon " tabindex="-1"> MaterialIcon </h3> <section id="Message.MaterialIcon.description"> <p> A <a href="https://fonts.google.com/icons">Google Material Icon</a>, which includes over 2500+ options. </p> <p> For example, to display a <a href="https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048">checkbox icon</a> with customized weight and grade, write the following: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">{ "name": "check_box", "fill": true, "weight": 300, "grade": -25 } </code></pre> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </section> <section id="Message.MaterialIcon.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"name"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"fill"</span><span class="pun">: </span><span class="kwd">boolean</span><span class="pun">,</span> <span class="str">"weight"</span><span class="pun">: </span><span class="kwd">integer</span><span class="pun">,</span> <span class="str">"grade"</span><span class="pun">: </span><span class="kwd">integer</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.MaterialIcon.FIELDS"> <table class="properties responsive fixed" id="Message.MaterialIcon.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.MaterialIcon.FIELDS.name"> <td> <code translate="no" dir="ltr">name</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The icon name defined in the <a href="https://fonts.google.com/icons">Google Material Icon</a>, for example, <code translate="no" dir="ltr">check_box</code>. Any invalid names are abandoned and replaced with empty string and results in the icon failing to render. </p> </td> </tr> <tr id="Message.MaterialIcon.FIELDS.fill"> <td> <code translate="no" dir="ltr">fill</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">boolean</code> </p> <p> Whether the icon renders as filled. Default value is false. </p> <p> To preview different icon settings, go to <a href="https://fonts.google.com/icons">Google Font Icons</a> and adjust the settings under <strong>Customize</strong>. </p> </td> </tr> <tr id="Message.MaterialIcon.FIELDS.weight"> <td> <code translate="no" dir="ltr">weight</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">integer</code> </p> <p> The stroke weight of the icon. Choose from {100, 200, 300, 400, 500, 600, 700}. If absent, default value is 400. If any other value is specified, the default value is used. </p> <p> To preview different icon settings, go to <a href="https://fonts.google.com/icons">Google Font Icons</a> and adjust the settings under <strong>Customize</strong>. </p> </td> </tr> <tr id="Message.MaterialIcon.FIELDS.grade"> <td> <code translate="no" dir="ltr">grade</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">integer</code> </p> <p> Weight and grade affect a symbol’s thickness. Adjustments to grade are more granular than adjustments to weight and have a small impact on the size of the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If any other value is specified, the default value is used. </p> <p> To preview different icon settings, go to <a href="https://fonts.google.com/icons">Google Font Icons</a> and adjust the settings under <strong>Customize</strong>. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.DecoratedText"> <h3 id="decoratedtext" data-text=" DecoratedText " tabindex="-1"> DecoratedText </h3> <section id="Message.DecoratedText.description"> <p> A widget that displays text with optional decorations such as a label above or below the text, an icon in front of the text, a selection widget, or a button after the text. For an example in Google Chat apps, see <a href="https://developers.google.com/workspace/chat/add-text-image-card-dialog#display_text_with_decorative_elements">Display text with decorative text</a>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.DecoratedText.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"icon"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Icon_1">Icon</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"startIcon"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Icon_1">Icon</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"topLabel"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"text"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"wrapText"</span><span class="pun">: </span><span class="kwd">boolean</span><span class="pun">,</span> <span class="str">"bottomLabel"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"onClick"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClick_1">OnClick</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="com">// Union field <code translate="no" dir="ltr">control</code> can be only one of the following:</span> <span class="str">"button"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Button_1">Button</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"switchControl"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SwitchControl">SwitchControl</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"endIcon"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Icon_1">Icon</a></code>)</span> <span class="pun">}</span> <span class="com">// End of list of possible types for union field <code translate="no" dir="ltr">control</code>.</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.DecoratedText.FIELDS"> <table class="properties responsive fixed" id="Message.DecoratedText.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.DecoratedText.FIELDS.icon"> <td> <code translate="no" dir="ltr">icon <br/> <b> (deprecated) </b></code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Icon_1">Icon</a></code>)</code> </p> <aside class="warning"> <p> This item is deprecated! </p> </aside> <p> Deprecated in favor of <code translate="no" dir="ltr">startIcon</code>. </p> </td> </tr> <tr id="Message.DecoratedText.FIELDS.start_icon"> <td> <code translate="no" dir="ltr">start<wbr/>Icon</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Icon_1">Icon</a></code>)</code> </p> <p> The icon displayed in front of the text. </p> </td> </tr> <tr id="Message.DecoratedText.FIELDS.top_label"> <td> <code translate="no" dir="ltr">top<wbr/>Label</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The text that appears above <code translate="no" dir="ltr">text</code>. Always truncates. </p> </td> </tr> <tr id="Message.DecoratedText.FIELDS.text"> <td> <code translate="no" dir="ltr">text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> Required. The primary text. </p> <p> Supports simple formatting. For more information about formatting text, see <a href="https://developers.google.com/workspace/chat/format-messages#card-formatting">Formatting text in Google Chat apps</a> and <a href="https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting">Formatting text in Google Workspace Add-ons</a>. </p> </td> </tr> <tr id="Message.DecoratedText.FIELDS.wrap_text"> <td> <code translate="no" dir="ltr">wrap<wbr/>Text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">boolean</code> </p> <p> The wrap text setting. If <code translate="no" dir="ltr">true</code>, the text wraps and displays on multiple lines. Otherwise, the text is truncated. </p> <p> Only applies to <code translate="no" dir="ltr">text</code>, not <code translate="no" dir="ltr">topLabel</code> and <code translate="no" dir="ltr">bottomLabel</code>. </p> </td> </tr> <tr id="Message.DecoratedText.FIELDS.bottom_label"> <td> <code translate="no" dir="ltr">bottom<wbr/>Label</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The text that appears below <code translate="no" dir="ltr">text</code>. Always wraps. </p> </td> </tr> <tr id="Message.DecoratedText.FIELDS.on_click"> <td> <code translate="no" dir="ltr">on<wbr/>Click</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClick_1">OnClick</a></code>)</code> </p> <p> This action is triggered when users click <code translate="no" dir="ltr">topLabel</code> or <code translate="no" dir="ltr">bottomLabel</code>. </p> </td> </tr> <tr class="alt" id="Message.DecoratedText.FIELDS.oneof_control"> <td colspan="2"> Union field <code translate="no" dir="ltr">control</code>. A button, switch, checkbox, or image that appears to the right-hand side of text in the <code translate="no" dir="ltr">decoratedText</code> widget. <code translate="no" dir="ltr">control</code> can be only one of the following: </td> </tr> <tr id="Message.DecoratedText.FIELDS.button"> <td> <code translate="no" dir="ltr">button</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Button_1">Button</a></code>)</code> </p> <p> A button that a user can click to trigger an action. </p> </td> </tr> <tr id="Message.DecoratedText.FIELDS.switch_control"> <td> <code translate="no" dir="ltr">switch<wbr/>Control</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SwitchControl">SwitchControl</a></code>)</code> </p> <p> A switch widget that a user can click to change its state and trigger an action. </p> </td> </tr> <tr id="Message.DecoratedText.FIELDS.end_icon"> <td> <code translate="no" dir="ltr">end<wbr/>Icon</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Icon_1">Icon</a></code>)</code> </p> <p> An icon displayed after the text. </p> <p> Supports <a href="https://developers.google.com/workspace/chat/format-messages#builtinicons">built-in</a> and <a href="https://developers.google.com/workspace/chat/format-messages#customicons">custom</a> icons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.Button_1"> <h3 id="button" data-text=" Button " tabindex="-1"> Button </h3> <section id="Message.Button_1.description"> <p> A text, icon, or text and icon button that users can click. For an example in Google Chat apps, see <a href="https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button">Add a button</a>. </p> <p> To make an image a clickable button, specify an <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Image_1"><code translate="no" dir="ltr">Image</code></a></code> (not an <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ImageComponent"><code translate="no" dir="ltr">ImageComponent</code></a></code>) and set an <code translate="no" dir="ltr">onClick</code> action. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.Button_1.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"text"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"icon"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Icon_1">Icon</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"color"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Color">Color</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"onClick"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClick_1">OnClick</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"disabled"</span><span class="pun">: </span><span class="kwd">boolean</span><span class="pun">,</span> <span class="str">"altText"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"type"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Type">Type</a></code>)</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Button_1.FIELDS"> <table class="properties responsive fixed" id="Message.Button_1.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.Button_1.FIELDS.text"> <td> <code translate="no" dir="ltr">text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The text displayed inside the button. </p> </td> </tr> <tr id="Message.Button_1.FIELDS.icon"> <td> <code translate="no" dir="ltr">icon</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Icon_1">Icon</a></code>)</code> </p> <p> An icon displayed inside the button. If both <code translate="no" dir="ltr">icon</code> and <code translate="no" dir="ltr">text</code> are set, then the icon appears before the text. </p> </td> </tr> <tr id="Message.Button_1.FIELDS.color"> <td> <code translate="no" dir="ltr">color</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Color">Color</a></code>)</code> </p> <p> Optional. The color of the button. If set, the button <code translate="no" dir="ltr">type</code> is set to <code translate="no" dir="ltr">FILLED</code> and the color of <code translate="no" dir="ltr">text</code> and <code translate="no" dir="ltr">icon</code> fields are set to a contrasting color for readability. For example, if the button color is set to blue, any text or icons in the button are set to white. </p> <p> To set the button color, specify a value for the <code translate="no" dir="ltr">red</code>, <code translate="no" dir="ltr">green</code>, and <code translate="no" dir="ltr">blue</code> fields. The value must be a float number between 0 and 1 based on the RGB color value, where <code translate="no" dir="ltr">0</code> (0/255) represents the absence of color and <code translate="no" dir="ltr">1</code> (255/255) represents the maximum intensity of the color. </p> <p> For example, the following sets the color to red at its maximum intensity: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"color": { "red": 1, "green": 0, "blue": 0, } </code></pre> <p> The <code translate="no" dir="ltr">alpha</code> field is unavailable for button color. If specified, this field is ignored. </p> </td> </tr> <tr id="Message.Button_1.FIELDS.on_click"> <td> <code translate="no" dir="ltr">on<wbr/>Click</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClick_1">OnClick</a></code>)</code> </p> <p> Required. The action to perform when a user clicks the button, such as opening a hyperlink or running a custom function. </p> </td> </tr> <tr id="Message.Button_1.FIELDS.disabled"> <td> <code translate="no" dir="ltr">disabled</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">boolean</code> </p> <p> If <code translate="no" dir="ltr">true</code>, the button is displayed in an inactive state and doesn't respond to user actions. </p> </td> </tr> <tr id="Message.Button_1.FIELDS.alt_text"> <td> <code translate="no" dir="ltr">alt<wbr/>Text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The alternative text that's used for accessibility. </p> <p> Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: "Opens a new browser tab and navigates to the Google Chat developer documentation at <a "="" href="https://developers.google.com/workspace/chat">https://developers.google.com/workspace/chat"</a>. </p> </td> </tr> <tr id="Message.Button_1.FIELDS.type"> <td> <code translate="no" dir="ltr">type</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Type">Type</a></code>)</code> </p> <p> Optional. The type of a button. If unset, button type defaults to <code translate="no" dir="ltr">OUTLINED</code>. If the <code translate="no" dir="ltr">color</code> field is set, the button type is forced to <code translate="no" dir="ltr">FILLED</code> and any value set for this field is ignored. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.Color"> <h3 id="color" data-text=" Color " tabindex="-1"> Color </h3> <section id="Message.Color.description"> <p> Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of <code translate="no" dir="ltr">java.awt.Color</code> in Java; it can also be trivially provided to UIColor's <code translate="no" dir="ltr">+colorWithRed:green:blue:alpha</code> method in iOS; and, with just a little work, it can be easily formatted into a CSS <code translate="no" dir="ltr">rgba()</code> string in JavaScript. </p> <p> This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. </p> <p> When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most <code translate="no" dir="ltr">1e-5</code>. </p> <p> Example (Java): </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr"> import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... </code></pre> <p> Example (iOS / Obj-C): </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr"> // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... </code></pre> <p> Example (JavaScript): </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">// ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ... </code></pre> </section> <section id="Message.Color.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"red"</span><span class="pun">: </span><span class="kwd">number</span><span class="pun">,</span> <span class="str">"green"</span><span class="pun">: </span><span class="kwd">number</span><span class="pun">,</span> <span class="str">"blue"</span><span class="pun">: </span><span class="kwd">number</span><span class="pun">,</span> <span class="str">"alpha"</span><span class="pun">: </span><span class="kwd">number</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Color.FIELDS"> <table class="properties responsive fixed" id="Message.Color.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.Color.FIELDS.red"> <td> <code translate="no" dir="ltr">red</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">number</code> </p> <p> The amount of red in the color as a value in the interval [0, 1]. </p> </td> </tr> <tr id="Message.Color.FIELDS.green"> <td> <code translate="no" dir="ltr">green</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">number</code> </p> <p> The amount of green in the color as a value in the interval [0, 1]. </p> </td> </tr> <tr id="Message.Color.FIELDS.blue"> <td> <code translate="no" dir="ltr">blue</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">number</code> </p> <p> The amount of blue in the color as a value in the interval [0, 1]. </p> </td> </tr> <tr id="Message.Color.FIELDS.alpha"> <td> <code translate="no" dir="ltr">alpha</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">number</code> </p> <p> The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: </p> <p> <code translate="no" dir="ltr">pixel color = alpha * (this color) + (1.0 - alpha) * (background color)</code> </p> <p> This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0). </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.Type"> <h3 id="type" data-text=" Type " tabindex="-1"> Type </h3> <section id="Message.Type.description"> <p> Optional. The <a href="https://m3.material.io/components/all-buttons#9134ac95-678e-49ae-a50a-e71948011b05">type</a> of a button. If <code translate="no" dir="ltr">color</code> field is set, the <code translate="no" dir="ltr">type</code> is forced to <code translate="no" dir="ltr">FILLED</code>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </section> <section id="Message.Type.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.Type.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.Type.ENUM_VALUES.TYPE_UNSPECIFIED"> <td> <code class="apitype" translate="no" dir="ltr">TYPE_UNSPECIFIED</code> </td> <td> Don't use. Unspecified. </td> </tr> <tr id="Message.Type.ENUM_VALUES.OUTLINED"> <td> <code class="apitype" translate="no" dir="ltr">OUTLINED</code> </td> <td> Outlined buttons are medium-emphasis buttons. They usually contain actions that are important, but aren’t the primary action in a Chat app or an add-on. </td> </tr> <tr id="Message.Type.ENUM_VALUES.FILLED"> <td> <code class="apitype" translate="no" dir="ltr">FILLED</code> </td> <td> A filled button has a container with a solid color. It has the most visual impact and is recommended for the important and primary action in a Chat app or an add-on. </td> </tr> <tr id="Message.Type.ENUM_VALUES.FILLED_TONAL"> <td> <code class="apitype" translate="no" dir="ltr">FILLED_TONAL</code> </td> <td> A filled tonal button is an alternative middle ground between filled and outlined buttons. They’re useful in contexts where a lower-priority button requires slightly more emphasis than an outline button would give. </td> </tr> <tr id="Message.Type.ENUM_VALUES.BORDERLESS"> <td> <code class="apitype" translate="no" dir="ltr">BORDERLESS</code> </td> <td> A button does not have an invisible container in its default state. It is often used for the lowest priority actions, especially when presenting multiple options. </td> </tr> </tbody> </table> </section> </section><section id="Message.SwitchControl"> <h3 id="switchcontrol" data-text=" SwitchControl " tabindex="-1"> SwitchControl </h3> <section id="Message.SwitchControl.description"> <p> Either a toggle-style switch or a checkbox inside a <code translate="no" dir="ltr">decoratedText</code> widget. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> <p> Only supported in the <code translate="no" dir="ltr">decoratedText</code> widget. </p> </section> <section id="Message.SwitchControl.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"name"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"value"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"selected"</span><span class="pun">: </span><span class="kwd">boolean</span><span class="pun">,</span> <span class="str">"onChangeAction"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"controlType"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ControlType">ControlType</a></code>)</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.SwitchControl.FIELDS"> <table class="properties responsive fixed" id="Message.SwitchControl.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.SwitchControl.FIELDS.name"> <td> <code translate="no" dir="ltr">name</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The name by which the switch widget is identified in a form input event. </p> <p> For details about working with form inputs, see <a href="https://developers.google.com/workspace/chat/read-form-data">Receive form data</a>. </p> </td> </tr> <tr id="Message.SwitchControl.FIELDS.value"> <td> <code translate="no" dir="ltr">value</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The value entered by a user, returned as part of a form input event. </p> <p> For details about working with form inputs, see <a href="https://developers.google.com/workspace/chat/read-form-data">Receive form data</a>. </p> </td> </tr> <tr id="Message.SwitchControl.FIELDS.selected"> <td> <code translate="no" dir="ltr">selected</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">boolean</code> </p> <p> When <code translate="no" dir="ltr">true</code>, the switch is selected. </p> </td> </tr> <tr id="Message.SwitchControl.FIELDS.on_change_action"> <td> <code translate="no" dir="ltr">on<wbr/>Change<wbr/>Action</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</code> </p> <p> The action to perform when the switch state is changed, such as what function to run. </p> </td> </tr> <tr id="Message.SwitchControl.FIELDS.control_type"> <td> <code translate="no" dir="ltr">control<wbr/>Type</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ControlType">ControlType</a></code>)</code> </p> <p> How the switch appears in the user interface. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.ControlType"> <h3 id="controltype" data-text=" ControlType " tabindex="-1"> ControlType </h3> <section id="Message.ControlType.description"> <p> How the switch appears in the user interface. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.ControlType.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.ControlType.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.ControlType.ENUM_VALUES.SWITCH"> <td> <code class="apitype" translate="no" dir="ltr">SWITCH</code> </td> <td> A toggle-style switch. </td> </tr> <tr id="Message.ControlType.ENUM_VALUES.CHECKBOX"> <td> <code class="apitype" translate="no" dir="ltr">CHECKBOX</code> </td> <td> Deprecated in favor of <code translate="no" dir="ltr">CHECK_BOX</code>. </td> </tr> <tr id="Message.ControlType.ENUM_VALUES.CHECK_BOX"> <td> <code class="apitype" translate="no" dir="ltr">CHECK_BOX</code> </td> <td> A checkbox. </td> </tr> </tbody> </table> </section> </section><section id="Message.ButtonList"> <h3 id="buttonlist" data-text=" ButtonList " tabindex="-1"> ButtonList </h3> <section id="Message.ButtonList.description"> <p> A list of buttons layed out horizontally. For an example in Google Chat apps, see <a href="https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button">Add a button</a>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.ButtonList.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"buttons"</span><span class="pun">: </span><span class="pun">[</span> <span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Button_1">Button</a></code>)</span> <span class="pun">}</span> <span class="pun">]</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.ButtonList.FIELDS"> <table class="properties responsive fixed" id="Message.ButtonList.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.ButtonList.FIELDS.buttons"> <td> <code translate="no" dir="ltr">buttons[]</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Button_1">Button</a></code>)</code> </p> <p> An array of buttons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.TextInput"> <h3 id="textinput" data-text=" TextInput " tabindex="-1"> TextInput </h3> <section id="Message.TextInput.description"> <p> A field in which users can enter text. Supports suggestions and on-change actions. For an example in Google Chat apps, see <a href="https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_field_in_which_a_user_can_enter_text">Add a field in which a user can enter text</a>. </p> <p> Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see <a href="https://developers.google.com/workspace/chat/read-form-data">Receive form data</a>. </p> <p> When you need to collect undefined or abstract data from users, use a text input. To collect defined or enumerated data from users, use the <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SelectionInput">SelectionInput</a></code> widget. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.TextInput.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"name"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"label"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"hintText"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"value"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"type"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Type_1">Type</a></code>)</span><span class="pun">,</span> <span class="str">"onChangeAction"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"initialSuggestions"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Suggestions">Suggestions</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"autoCompleteAction"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"validation"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Validation">Validation</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"placeholderText"</span><span class="pun">: </span><span class="kwd">string</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.TextInput.FIELDS"> <table class="properties responsive fixed" id="Message.TextInput.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.TextInput.FIELDS.name"> <td> <code translate="no" dir="ltr">name</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The name by which the text input is identified in a form input event. </p> <p> For details about working with form inputs, see <a href="https://developers.google.com/workspace/chat/read-form-data">Receive form data</a>. </p> </td> </tr> <tr id="Message.TextInput.FIELDS.label"> <td> <code translate="no" dir="ltr">label</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The text that appears above the text input field in the user interface. </p> <p> Specify text that helps the user enter the information your app needs. For example, if you are asking someone's name, but specifically need their surname, write <code translate="no" dir="ltr">surname</code> instead of <code translate="no" dir="ltr">name</code>. </p> <p> Required if <code translate="no" dir="ltr">hintText</code> is unspecified. Otherwise, optional. </p> </td> </tr> <tr id="Message.TextInput.FIELDS.hint_text"> <td> <code translate="no" dir="ltr">hint<wbr/>Text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. </p> <p> Required if <code translate="no" dir="ltr">label</code> is unspecified. Otherwise, optional. </p> </td> </tr> <tr id="Message.TextInput.FIELDS.value"> <td> <code translate="no" dir="ltr">value</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The value entered by a user, returned as part of a form input event. </p> <p> For details about working with form inputs, see <a href="https://developers.google.com/workspace/chat/read-form-data">Receive form data</a>. </p> </td> </tr> <tr id="Message.TextInput.FIELDS.type"> <td> <code translate="no" dir="ltr">type</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Type_1">Type</a></code>)</code> </p> <p> How a text input field appears in the user interface. For example, whether the field is single or multi-line. </p> </td> </tr> <tr id="Message.TextInput.FIELDS.on_change_action"> <td> <code translate="no" dir="ltr">on<wbr/>Change<wbr/>Action</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</code> </p> <p> What to do when a change occurs in the text input field. For example, a user adding to the field or deleting text. </p> <p> Examples of actions to take include running a custom function or opening a <a href="https://developers.google.com/workspace/chat/dialogs">dialog</a> in Google Chat. </p> </td> </tr> <tr id="Message.TextInput.FIELDS.initial_suggestions"> <td> <code translate="no" dir="ltr">initial<wbr/>Suggestions</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Suggestions">Suggestions</a></code>)</code> </p> <p> Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. </p> <p> For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing <code translate="no" dir="ltr">Jav</code>, the list of suggestions filters to show just <code translate="no" dir="ltr">Java</code> and <code translate="no" dir="ltr">JavaScript</code>. </p> <p> Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter <code translate="no" dir="ltr">javascript</code> and others <code translate="no" dir="ltr">java script</code>. Suggesting <code translate="no" dir="ltr">JavaScript</code> can standardize how users interact with your app. </p> <p> When specified, <code translate="no" dir="ltr">TextInput.type</code> is always <code translate="no" dir="ltr">SINGLE_LINE</code>, even if it's set to <code translate="no" dir="ltr">MULTIPLE_LINE</code>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </td> </tr> <tr id="Message.TextInput.FIELDS.auto_complete_action"> <td> <code translate="no" dir="ltr">auto<wbr/>Complete<wbr/>Action</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</code> </p> <p> Optional. Specify what action to take when the text input field provides suggestions to users who interact with it. </p> <p> If unspecified, the suggestions are set by <code translate="no" dir="ltr">initialSuggestions</code> and are processed by the client. </p> <p> If specified, the app takes the action specified here, such as running a custom function. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Workspace Add-ons and unavailable for Google Chat apps. </p> </td> </tr> <tr id="Message.TextInput.FIELDS.validation"> <td> <code translate="no" dir="ltr">validation</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Validation">Validation</a></code>)</code> </p> <p> </p> <aside class="preview"> <strong>Developer Preview:</strong> Available as part of the <a class="external" href="https://developers.google.com/workspace/preview" target="_blank">Google Workspace Developer Preview Program</a>, which grants early access to certain features. </aside> Specify the validation necessary for this text input field. <p> </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </td> </tr> <tr id="Message.TextInput.FIELDS.placeholder_text"> <td> <code translate="no" dir="ltr">placeholder<wbr/>Text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> Text that appears in the text input field when the field is empty. Use this text to prompt users to enter a value. For example, <code translate="no" dir="ltr">Enter a number from 0 to 100</code>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.Type_1"> <h3 id="type_1" data-text=" Type " tabindex="-1"> Type </h3> <section id="Message.Type_1.description"> <p> How a text input field appears in the user interface. For example, whether it's a single line input field, or a multi-line input. If <code translate="no" dir="ltr">initialSuggestions</code> is specified, <code translate="no" dir="ltr">type</code> is always <code translate="no" dir="ltr">SINGLE_LINE</code>, even if it's set to <code translate="no" dir="ltr">MULTIPLE_LINE</code>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.Type_1.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.Type_1.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.Type_1.ENUM_VALUES.SINGLE_LINE"> <td> <code class="apitype" translate="no" dir="ltr">SINGLE_LINE</code> </td> <td> The text input field has a fixed height of one line. </td> </tr> <tr id="Message.Type_1.ENUM_VALUES.MULTIPLE_LINE"> <td> <code class="apitype" translate="no" dir="ltr">MULTIPLE_LINE</code> </td> <td> The text input field has a fixed height of multiple lines. </td> </tr> </tbody> </table> </section> </section><section id="RenderActions"> <h3 id="renderactions" data-text="RenderActions" tabindex="-1">RenderActions</h3> <section> <p>A set of render instructions that tells a card to perform an action, or tells the add-on host app or the Chat app to perform an app-specific action.</p> <p><img src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg" class="inline-icon" alt> <img src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg" class="inline-icon" alt> Available for Google Chat apps and Google Workspace Add-ons.</p> </section> <section id="RenderActions.FIELDS"> <table class="properties responsive fixed"> <colgroup><col width="25%"><col></colgroup> <thead><tr><th colspan="2">Fields</th></tr></thead> <tbody><tr><td><code translate="no" dir="ltr">action</code></td><td><p><code class="apitype" translate="no" dir="ltr"><code translate="no" dir="ltr"><a href="#RenderActions.Action">Action</a></code></code></p></td></tr></tbody> </table> </section> </section> <section id="RenderActions.Action"> <h3 id="action_1" data-text="Action" tabindex="-1">Action</h3> <section id="Action.FIELDS"> <table class="properties responsive fixed"> <colgroup><col width="25%"><col></colgroup> <thead><tr><th colspan="2">Fields</th></tr></thead> <tbody> <tr id="google.apps.card.v1.RenderActions.Action.FIELDS.repeated.google.apps.card.v1.Navigation.google.apps.card.v1.RenderActions.Action.navigations"> <td><code translate="no" dir="ltr">navigations[]</code></td> <td> <p><code class="apitype" translate="no" dir="ltr"><code translate="no" dir="ltr"><a href="#RenderActions.Action.Navigation">Navigation</a></code></code></p> <p>Push or update displayed cards.</p> </td> </tr> </tbody> </table> </section> </section> <section id="RenderActions.Action.Navigation"> <h3 id="navigation" data-text="Navigation" tabindex="-1">Navigation</h3> <section> <p>Add a new card to the stack (navigate forward). For Chat apps, only available for <a href="https://developers.google.com/workspace/chat/send-app-home-card-message">app home</a>.</p> <p><img src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg" class="inline-icon" alt> <img src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg" class="inline-icon" alt> Available for Google Chat apps and Google Workspace Add-ons.</p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">navigations: { pushCard: CARD } </code></pre> <p>Replace the top card with a new card. For Chat apps, only available for <a href="https://developers.google.com/workspace/chat/send-app-home-card-message">app home</a>.</p> <p><img src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg" class="inline-icon" alt> <img src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg" class="inline-icon" alt> Available for Google Chat apps and Google Workspace Add-ons.</p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">navigations: { updateCard: CARD } </code></pre> </section> <section id="Navigation.FIELDS"> <table class="properties responsive fixed"> <colgroup><col width="25%"><col></colgroup> <thead><tr><th colspan="2">Fields</th></tr></thead> <tbody> <tr id="google.apps.card.v1.Navigation.FIELDS.oneof_navigate_action" class="alt"> <td colspan="2"><p>Union field <code translate="no" dir="ltr">navigate_action</code>.</p><p><code translate="no" dir="ltr">navigate_action</code> can be only one of the following:</p></td> </tr> <tr id="google.apps.card.v1.Navigation.FIELDS.google.apps.card.v1.Card.google.apps.card.v1.Navigation.pushCard"> <td><code translate="no" dir="ltr">push<wbr>Card</code></td> <td> <p><code class="apitype" translate="no" dir="ltr"><code translate="no" dir="ltr"><a href="#card">Card</a></code></code></p> <p>Card stack pushes a card onto the card stack.</p> </td> </tr> <tr id="google.apps.card.v1.Navigation.FIELDS.google.apps.card.v1.Card.google.apps.card.v1.Navigation.updateCard"> <td><code translate="no" dir="ltr">update<wbr>Card</code></td> <td> <p><code class="apitype" translate="no" dir="ltr"><code translate="no" dir="ltr"><a href="#card">Card</a></code></code></p> <p>Card stack updates the top card with a new card and preserves filled form fields values. For a non-equivalent field, the value is dropped.</p> </td> </tr> </tbody> </table> </section> </section><section id="Message.Suggestions"> <h3 id="suggestions" data-text=" Suggestions " tabindex="-1"> Suggestions </h3> <section id="Message.Suggestions.description"> <p> Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. </p> <p> For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing <code translate="no" dir="ltr">Jav</code>, the list of suggestions filters to show <code translate="no" dir="ltr">Java</code> and <code translate="no" dir="ltr">JavaScript</code>. </p> <p> Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter <code translate="no" dir="ltr">javascript</code> and others <code translate="no" dir="ltr">java script</code>. Suggesting <code translate="no" dir="ltr">JavaScript</code> can standardize how users interact with your app. </p> <p> When specified, <code translate="no" dir="ltr">TextInput.type</code> is always <code translate="no" dir="ltr">SINGLE_LINE</code>, even if it's set to <code translate="no" dir="ltr">MULTIPLE_LINE</code>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.Suggestions.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"items"</span><span class="pun">: </span><span class="pun">[</span> <span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SuggestionItem">SuggestionItem</a></code>)</span> <span class="pun">}</span> <span class="pun">]</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Suggestions.FIELDS"> <table class="properties responsive fixed" id="Message.Suggestions.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.Suggestions.FIELDS.items"> <td> <code translate="no" dir="ltr">items[]</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SuggestionItem">SuggestionItem</a></code>)</code> </p> <p> A list of suggestions used for autocomplete recommendations in text input fields. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.SuggestionItem"> <h3 id="suggestionitem" data-text=" SuggestionItem " tabindex="-1"> SuggestionItem </h3> <section id="Message.SuggestionItem.description"> <p> One suggested value that users can enter in a text input field. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.SuggestionItem.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="com">// Union field <code translate="no" dir="ltr">content</code> can be only one of the following:</span> <span class="str">"text"</span><span class="pun">: </span><span class="kwd">string</span> <span class="com">// End of list of possible types for union field <code translate="no" dir="ltr">content</code>.</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.SuggestionItem.FIELDS"> <table class="properties responsive fixed" id="Message.SuggestionItem.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr class="alt" id="Message.SuggestionItem.FIELDS.oneof_content"> <td colspan="2"> <p> Union field <code translate="no" dir="ltr">content</code>. </p> <p> <code translate="no" dir="ltr">content</code> can be only one of the following: </p> </td> </tr> <tr id="Message.SuggestionItem.FIELDS.text"> <td> <code translate="no" dir="ltr">text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The value of a suggested input to a text input field. This is equivalent to what users enter themselves. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.Validation"> <h3 id="validation" data-text=" Validation " tabindex="-1"> Validation </h3> <section id="Message.Validation.description"> <p> </p> <aside class="preview"> <strong>Developer Preview:</strong> Available as part of the <a class="external" href="https://developers.google.com/workspace/preview" target="_blank">Google Workspace Developer Preview Program</a>, which grants early access to certain features. </aside> Represents the necessary data for validating the widget it's attached to. <p> </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.Validation.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"characterLimit"</span><span class="pun">: </span><span class="kwd">integer</span><span class="pun">,</span> <span class="str">"inputType"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.InputType">InputType</a></code>)</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Validation.FIELDS"> <table class="properties responsive fixed" id="Message.Validation.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.Validation.FIELDS.character_limit"> <td> <code translate="no" dir="ltr">character<wbr/>Limit</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">integer</code> </p> <p> </p> <aside class="preview"> <strong>Developer Preview:</strong> Available as part of the <a class="external" href="https://developers.google.com/workspace/preview" target="_blank">Google Workspace Developer Preview Program</a>, which grants early access to certain features. </aside> Specify the character limit for text input widgets. Note that this is only used for text input and is ignored for other widgets. <p> </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </td> </tr> <tr id="Message.Validation.FIELDS.input_type"> <td> <code translate="no" dir="ltr">input<wbr/>Type</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.InputType">InputType</a></code>)</code> </p> <p> </p> <aside class="preview"> <strong>Developer Preview:</strong> Available as part of the <a class="external" href="https://developers.google.com/workspace/preview" target="_blank">Google Workspace Developer Preview Program</a>, which grants early access to certain features. </aside> Specify the type of the input widgets. <p> </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.InputType"> <h3 id="inputtype" data-text=" InputType " tabindex="-1"> InputType </h3> <section id="Message.InputType.description"> <p> The type of the input widget. </p> </section> <section id="Message.InputType.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.InputType.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.InputType.ENUM_VALUES.INPUT_TYPE_UNSPECIFIED"> <td> <code class="apitype" translate="no" dir="ltr">INPUT_TYPE_UNSPECIFIED</code> </td> <td> Unspecified type. Do not use. </td> </tr> <tr id="Message.InputType.ENUM_VALUES.TEXT"> <td> <code class="apitype" translate="no" dir="ltr">TEXT</code> </td> <td> Regular text that accepts all characters. </td> </tr> <tr id="Message.InputType.ENUM_VALUES.INTEGER"> <td> <code class="apitype" translate="no" dir="ltr">INTEGER</code> </td> <td> An integer value. </td> </tr> <tr id="Message.InputType.ENUM_VALUES.FLOAT"> <td> <code class="apitype" translate="no" dir="ltr">FLOAT</code> </td> <td> A float value. </td> </tr> <tr id="Message.InputType.ENUM_VALUES.EMAIL"> <td> <code class="apitype" translate="no" dir="ltr">EMAIL</code> </td> <td> An email address. </td> </tr> <tr id="Message.InputType.ENUM_VALUES.EMOJI_PICKER"> <td> <code class="apitype" translate="no" dir="ltr">EMOJI_PICKER</code> </td> <td> A emoji selected from system-provided emoji picker. </td> </tr> </tbody> </table> </section> </section><section id="Message.SelectionInput"> <h3 id="selectioninput" data-text=" SelectionInput " tabindex="-1"> SelectionInput </h3> <section id="Message.SelectionInput.description"> <p> A widget that creates one or more UI items that users can select. For example, a dropdown menu or checkboxes. You can use this widget to collect data that can be predicted or enumerated. For an example in Google Chat apps, see <a href="/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elements">Add selectable UI elements</a>. </p> <p> Chat apps can process the value of items that users select or input. For details about working with form inputs, see <a href="https://developers.google.com/workspace/chat/read-form-data">Receive form data</a>. </p> <p> To collect undefined or abstract data from users, use the <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.TextInput">TextInput</a></code> widget. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.SelectionInput.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"name"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"label"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"type"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SelectionType">SelectionType</a></code>)</span><span class="pun">,</span> <span class="str">"items"</span><span class="pun">: </span><span class="pun">[</span> <span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SelectionItem">SelectionItem</a></code>)</span> <span class="pun">}</span> <span class="pun">]</span><span class="pun">,</span> <span class="str">"onChangeAction"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"multiSelectMaxSelectedItems"</span><span class="pun">: </span><span class="kwd">integer</span><span class="pun">,</span> <span class="str">"multiSelectMinQueryLength"</span><span class="pun">: </span><span class="kwd">integer</span><span class="pun">,</span> <span class="str">"validation"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Validation">Validation</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="com">// Union field <code translate="no" dir="ltr">multi_select_data_source</code> can be only one of the following:</span> <span class="str">"externalDataSource"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"platformDataSource"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.PlatformDataSource">PlatformDataSource</a></code>)</span> <span class="pun">}</span> <span class="com">// End of list of possible types for union field <code translate="no" dir="ltr">multi_select_data_source</code>.</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.SelectionInput.FIELDS"> <table class="properties responsive fixed" id="Message.SelectionInput.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.SelectionInput.FIELDS.name"> <td> <code translate="no" dir="ltr">name</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> Required. The name that identifies the selection input in a form input event. </p> <p> For details about working with form inputs, see <a href="https://developers.google.com/workspace/chat/read-form-data">Receive form data</a>. </p> </td> </tr> <tr id="Message.SelectionInput.FIELDS.label"> <td> <code translate="no" dir="ltr">label</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The text that appears above the selection input field in the user interface. </p> <p> Specify text that helps the user enter the information your app needs. For example, if users are selecting the urgency of a work ticket from a drop-down menu, the label might be "Urgency" or "Select urgency". </p> </td> </tr> <tr id="Message.SelectionInput.FIELDS.type"> <td> <code translate="no" dir="ltr">type</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SelectionType">SelectionType</a></code>)</code> </p> <p> The type of items that are displayed to users in a <code translate="no" dir="ltr">SelectionInput</code> widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu. </p> </td> </tr> <tr id="Message.SelectionInput.FIELDS.items"> <td> <code translate="no" dir="ltr">items[]</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SelectionItem">SelectionItem</a></code>)</code> </p> <p> An array of selectable items. For example, an array of radio buttons or checkboxes. Supports up to 100 items. </p> </td> </tr> <tr id="Message.SelectionInput.FIELDS.on_change_action"> <td> <code translate="no" dir="ltr">on<wbr/>Change<wbr/>Action</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</code> </p> <p> If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form. </p> <p> For details about working with form inputs, see <a href="https://developers.google.com/workspace/chat/read-form-data">Receive form data</a>. </p> </td> </tr> <tr id="Message.SelectionInput.FIELDS.multi_select_max_selected_items"> <td> <code translate="no" dir="ltr">multi<wbr/>Select<wbr/>Max<wbr/>Selected<wbr/>Items</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">integer</code> </p> <p> For multiselect menus, the maximum number of items that a user can select. Minimum value is 1 item. If unspecified, defaults to 3 items. </p> </td> </tr> <tr id="Message.SelectionInput.FIELDS.multi_select_min_query_length"> <td> <code translate="no" dir="ltr">multi<wbr/>Select<wbr/>Min<wbr/>Query<wbr/>Length</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">integer</code> </p> <p> For multiselect menus, the number of text characters that a user inputs before the menu returns suggested selection items. </p> <p> If unset, the multiselect menu uses the following default values: </p> <ul> <li> If the menu uses a static array of <code translate="no" dir="ltr">SelectionInput</code> items, defaults to 0 characters and immediately populates items from the array. </li> <li> If the menu uses a dynamic data source ( <code translate="no" dir="ltr">multi_select_data_source</code>), defaults to 3 characters before querying the data source to return suggested items. </li> </ul> </td> </tr> <tr id="Message.SelectionInput.FIELDS.validation"> <td> <code translate="no" dir="ltr">validation</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Validation">Validation</a></code>)</code> </p> <p> For dropdown menus, the validation for this selection input field. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </td> </tr> <tr class="alt" id="Message.SelectionInput.FIELDS.oneof_multi_select_data_source"> <td colspan="2"> <p> Union field <code translate="no" dir="ltr">multi_select_data_source</code>. For a multiselect menu, a data source that dynamically populates selection items. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. <code translate="no" dir="ltr">multi_select_data_source</code> can be only one of the following: </p> </td> </tr> <tr id="Message.SelectionInput.FIELDS.external_data_source"> <td> <code translate="no" dir="ltr">external<wbr/>Data<wbr/>Source</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</code> </p> <p> An external data source, such as a relational database. </p> </td> </tr> <tr id="Message.SelectionInput.FIELDS.platform_data_source"> <td> <code translate="no" dir="ltr">platform<wbr/>Data<wbr/>Source</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.PlatformDataSource">PlatformDataSource</a></code>)</code> </p> <p> A data source from Google Workspace. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.SelectionType"> <h3 id="selectiontype" data-text=" SelectionType " tabindex="-1"> SelectionType </h3> <section id="Message.SelectionType.description"> <p> The format for the items that users can select. Different options support different types of interactions. For example, users can select multiple checkboxes, but can only select one item from a dropdown menu. </p> <p> Each selection input supports one type of selection. Mixing checkboxes and switches, for example, isn't supported. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.SelectionType.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.SelectionType.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.SelectionType.ENUM_VALUES.CHECK_BOX"> <td> <code class="apitype" translate="no" dir="ltr">CHECK_BOX</code> </td> <td> A set of checkboxes. Users can select one or more checkboxes. </td> </tr> <tr id="Message.SelectionType.ENUM_VALUES.RADIO_BUTTON"> <td> <code class="apitype" translate="no" dir="ltr">RADIO_BUTTON</code> </td> <td> A set of radio buttons. Users can select one radio button. </td> </tr> <tr id="Message.SelectionType.ENUM_VALUES.SWITCH"> <td> <code class="apitype" translate="no" dir="ltr">SWITCH</code> </td> <td> A set of switches. Users can turn on one or more switches. </td> </tr> <tr id="Message.SelectionType.ENUM_VALUES.DROPDOWN"> <td> <code class="apitype" translate="no" dir="ltr">DROPDOWN</code> </td> <td> A dropdown menu. Users can select one item from the menu. </td> </tr> <tr id="Message.SelectionType.ENUM_VALUES.MULTI_SELECT"> <td> <code class="apitype" translate="no" dir="ltr">MULTI_SELECT</code> </td> <td> <p> A menu with a text box. Users can type and select one or more items. </p> <p> For Google Workspace Add-ons, you must populate items using a static array of <code translate="no" dir="ltr">SelectionItem</code> objects. </p> <p> For Google Chat apps, you can also populate items using a dynamic data source and autosuggest items as users type in the menu. For example, users can start typing the name of a Google Chat space and the widget autosuggests the space. To dynamically populate items for a multiselect menu, use one of the following types of data sources: </p> <ul> <li> Google Workspace data: Items are populated using data from Google Workspace, such as Google Workspace users or Google Chat spaces. </li> <li> External data: Items are populated from an external data source outside of Google Workspace. </li> </ul> <p> For examples of how to implement multiselect menus for Chat apps, see <a href="https://developers.google.com/workspace/chat/design-interactive-card-dialog#multiselect-menu">Add a multiselect menu</a>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.SelectionItem"> <h3 id="selectionitem" data-text=" SelectionItem " tabindex="-1"> SelectionItem </h3> <section id="Message.SelectionItem.description"> <p> An item that users can select in a selection input, such as a checkbox or switch. Supports up to 100 items. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.SelectionItem.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"text"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"value"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"selected"</span><span class="pun">: </span><span class="kwd">boolean</span><span class="pun">,</span> <span class="str">"startIconUri"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"bottomText"</span><span class="pun">: </span><span class="kwd">string</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.SelectionItem.FIELDS"> <table class="properties responsive fixed" id="Message.SelectionItem.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.SelectionItem.FIELDS.text"> <td> <code translate="no" dir="ltr">text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The text that identifies or describes the item to users. </p> </td> </tr> <tr id="Message.SelectionItem.FIELDS.value"> <td> <code translate="no" dir="ltr">value</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The value associated with this item. The client should use this as a form input value. </p> <p> For details about working with form inputs, see <a href="https://developers.google.com/workspace/chat/read-form-data">Receive form data</a>. </p> </td> </tr> <tr id="Message.SelectionItem.FIELDS.selected"> <td> <code translate="no" dir="ltr">selected</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">boolean</code> </p> <p> Whether the item is selected by default. If the selection input only accepts one value (such as for radio buttons or a dropdown menu), only set this field for one item. </p> </td> </tr> <tr id="Message.SelectionItem.FIELDS.start_icon_uri"> <td> <code translate="no" dir="ltr">start<wbr/>Icon<wbr/>Uri</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> For multiselect menus, the URL for the icon displayed next to the item's <code translate="no" dir="ltr">text</code> field. Supports PNG and JPEG files. Must be an <code translate="no" dir="ltr">HTTPS</code> URL. For example, <code translate="no" dir="ltr">https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png</code>. </p> </td> </tr> <tr id="Message.SelectionItem.FIELDS.bottom_text"> <td> <code translate="no" dir="ltr">bottom<wbr/>Text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> For multiselect menus, a text description or label that's displayed below the item's <code translate="no" dir="ltr">text</code> field. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.PlatformDataSource"> <h3 id="platformdatasource" data-text=" PlatformDataSource " tabindex="-1"> PlatformDataSource </h3> <section id="Message.PlatformDataSource.description"> <p> For a <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SelectionInput"><code translate="no" dir="ltr">SelectionInput</code></a></code> widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </section> <section id="Message.PlatformDataSource.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="com">// Union field <code translate="no" dir="ltr">data_source</code> can be only one of the following:</span> <span class="str">"commonDataSource"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.CommonDataSource">CommonDataSource</a></code>)</span><span class="pun">,</span> <span class="str">"hostAppDataSource"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.HostAppDataSourceMarkup">HostAppDataSourceMarkup</a></code>)</span> <span class="pun">}</span> <span class="com">// End of list of possible types for union field <code translate="no" dir="ltr">data_source</code>.</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.PlatformDataSource.FIELDS"> <table class="properties responsive fixed" id="Message.PlatformDataSource.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr class="alt" id="Message.PlatformDataSource.FIELDS.oneof_data_source"> <td colspan="2"> Union field <code translate="no" dir="ltr">data_source</code>. The data source. <code translate="no" dir="ltr">data_source</code> can be only one of the following: </td> </tr> <tr id="Message.PlatformDataSource.FIELDS.common_data_source"> <td> <code translate="no" dir="ltr">common<wbr/>Data<wbr/>Source</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.CommonDataSource">CommonDataSource</a></code>)</code> </p> <p> A data source shared by all Google Workspace applications, such as users in a Google Workspace organization. </p> </td> </tr> <tr id="Message.PlatformDataSource.FIELDS.host_app_data_source"> <td> <code translate="no" dir="ltr">host<wbr/>App<wbr/>Data<wbr/>Source</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.HostAppDataSourceMarkup">HostAppDataSourceMarkup</a></code>)</code> </p> <p> A data source that's unique to a Google Workspace host application, such spaces in Google Chat. </p> <p> This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see <a href="https://developers.google.com/workspace/chat/libraries">Install the client libraries</a>. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.CommonDataSource"> <h3 id="commondatasource" data-text=" CommonDataSource " tabindex="-1"> CommonDataSource </h3> <section id="Message.CommonDataSource.description"> <p> A data source shared by all <a href="https://developers.google.com/workspace/chat/api/reference/rest/v1/HostApp">Google Workspace applications</a>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </section> <section id="Message.CommonDataSource.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.CommonDataSource.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.CommonDataSource.ENUM_VALUES.UNKNOWN"> <td> <code class="apitype" translate="no" dir="ltr">UNKNOWN</code> </td> <td> Default value. Don't use. </td> </tr> <tr id="Message.CommonDataSource.ENUM_VALUES.USER"> <td> <code class="apitype" translate="no" dir="ltr">USER</code> </td> <td> Google Workspace users. The user can only view and select users from their Google Workspace organization. </td> </tr> </tbody> </table> </section> </section><section id="Message.HostAppDataSourceMarkup"> <h3 id="hostappdatasourcemarkup" data-text=" HostAppDataSourceMarkup " tabindex="-1"> HostAppDataSourceMarkup </h3> <section id="Message.HostAppDataSourceMarkup.description"> <p> For a <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SelectionInput"><code translate="no" dir="ltr">SelectionInput</code></a></code> widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </section> <section id="Message.HostAppDataSourceMarkup.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="com">// Union field <code translate="no" dir="ltr">data_source</code> can be only one of the following:</span> <span class="str">"chatDataSource"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ChatClientDataSourceMarkup">ChatClientDataSourceMarkup</a></code>)</span> <span class="pun">}</span> <span class="com">// End of list of possible types for union field <code translate="no" dir="ltr">data_source</code>.</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.HostAppDataSourceMarkup.FIELDS"> <table class="properties responsive fixed" id="Message.HostAppDataSourceMarkup.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr class="alt" id="Message.HostAppDataSourceMarkup.FIELDS.oneof_data_source"> <td colspan="2"> Union field <code translate="no" dir="ltr">data_source</code>. The Google Workspace application that populates items for a multiselect menu. <code translate="no" dir="ltr">data_source</code> can be only one of the following: </td> </tr> <tr id="Message.HostAppDataSourceMarkup.FIELDS.chat_data_source"> <td> <code translate="no" dir="ltr">chat<wbr/>Data<wbr/>Source</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ChatClientDataSourceMarkup">ChatClientDataSourceMarkup</a></code>)</code> </p> <p> A data source from Google Chat. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.ChatClientDataSourceMarkup"> <h3 id="chatclientdatasourcemarkup" data-text=" ChatClientDataSourceMarkup " tabindex="-1"> ChatClientDataSourceMarkup </h3> <section id="Message.ChatClientDataSourceMarkup.description"> <p> For a <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SelectionInput"><code translate="no" dir="ltr">SelectionInput</code></a></code> widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </section> <section id="Message.ChatClientDataSourceMarkup.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="com">// Union field <code translate="no" dir="ltr">source</code> can be only one of the following:</span> <span class="str">"spaceDataSource"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SpaceDataSource">SpaceDataSource</a></code>)</span> <span class="pun">}</span> <span class="com">// End of list of possible types for union field <code translate="no" dir="ltr">source</code>.</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.ChatClientDataSourceMarkup.FIELDS"> <table class="properties responsive fixed" id="Message.ChatClientDataSourceMarkup.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr class="alt" id="Message.ChatClientDataSourceMarkup.FIELDS.oneof_source"> <td colspan="2"> Union field <code translate="no" dir="ltr">source</code>. The Google Chat data source. <code translate="no" dir="ltr">source</code> can be only one of the following: </td> </tr> <tr id="Message.ChatClientDataSourceMarkup.FIELDS.space_data_source"> <td> <code translate="no" dir="ltr">space<wbr/>Data<wbr/>Source</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SpaceDataSource">SpaceDataSource</a></code>)</code> </p> <p> Google Chat spaces that the user is a member of. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.SpaceDataSource"> <h3 id="spacedatasource" data-text=" SpaceDataSource " tabindex="-1"> SpaceDataSource </h3> <section id="Message.SpaceDataSource.description"> <p> A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </section> <section id="Message.SpaceDataSource.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"defaultToCurrentSpace"</span><span class="pun">: </span><span class="kwd">boolean</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.SpaceDataSource.FIELDS"> <table class="properties responsive fixed" id="Message.SpaceDataSource.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.SpaceDataSource.FIELDS.default_to_current_space"> <td> <code translate="no" dir="ltr">default<wbr/>To<wbr/>Current<wbr/>Space</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">boolean</code> </p> <p> If set to <code translate="no" dir="ltr">true</code>, the multiselect menu selects the current Google Chat space as an item by default. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.DateTimePicker"> <h3 id="datetimepicker" data-text=" DateTimePicker " tabindex="-1"> DateTimePicker </h3> <section id="Message.DateTimePicker.description"> <p> Lets users input a date, a time, or both a date and a time. For an example in Google Chat apps, see <a href="https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time">Let a user pick a date and time</a>. </p> <p> Users can input text or use the picker to select dates and times. If users input an invalid date or time, the picker shows an error that prompts users to input the information correctly. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.DateTimePicker.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"name"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"label"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"type"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DateTimePickerType">DateTimePickerType</a></code>)</span><span class="pun">,</span> <span class="str">"valueMsEpoch"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"timezoneOffsetDate"</span><span class="pun">: </span><span class="kwd">integer</span><span class="pun">,</span> <span class="str">"onChangeAction"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"validation"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Validation">Validation</a></code>)</span> <span class="pun">}</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.DateTimePicker.FIELDS"> <table class="properties responsive fixed" id="Message.DateTimePicker.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.DateTimePicker.FIELDS.name"> <td> <code translate="no" dir="ltr">name</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The name by which the <code translate="no" dir="ltr">DateTimePicker</code> is identified in a form input event. </p> <p> For details about working with form inputs, see <a href="https://developers.google.com/workspace/chat/read-form-data">Receive form data</a>. </p> </td> </tr> <tr id="Message.DateTimePicker.FIELDS.label"> <td> <code translate="no" dir="ltr">label</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as <code translate="no" dir="ltr">Appointment date</code> or <code translate="no" dir="ltr">Appointment date and time</code>. </p> </td> </tr> <tr id="Message.DateTimePicker.FIELDS.type"> <td> <code translate="no" dir="ltr">type</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DateTimePickerType">DateTimePickerType</a></code>)</code> </p> <p> Whether the widget supports inputting a date, a time, or the date and time. </p> </td> </tr> <tr id="Message.DateTimePicker.FIELDS.value_ms_epoch"> <td> <code translate="no" dir="ltr">value<wbr/>Ms<wbr/>Epoch</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string (<a href="https://developers.google.com/discovery/v1/type-format">int64</a> format)</code> </p> <p> The default value displayed in the widget, in milliseconds since <a href="https://en.wikipedia.org/wiki/Unix_time">Unix epoch time</a>. </p> <p> Specify the value based on the type of picker ( <code translate="no" dir="ltr">DateTimePickerType</code>): </p> <ul> <li> <code translate="no" dir="ltr">DATE_AND_TIME</code> : a calendar date and time in UTC. For example, to represent January 1, 2023 at 12:00 PM UTC, use <code translate="no" dir="ltr">1672574400000</code>. </li> <li> <code translate="no" dir="ltr">DATE_ONLY</code> : a calendar date at 00:00:00 UTC. For example, to represent January 1, 2023, use <code translate="no" dir="ltr">1672531200000</code>. </li> <li> <code translate="no" dir="ltr">TIME_ONLY</code> : a time in UTC. For example, to represent 12:00 PM, use <code translate="no" dir="ltr">43200000</code> (or <code translate="no" dir="ltr">12 * 60 * 60 * 1000</code>). </li> </ul> </td> </tr> <tr id="Message.DateTimePicker.FIELDS.timezone_offset_date"> <td> <code translate="no" dir="ltr">timezone<wbr/>Offset<wbr/>Date</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">integer</code> </p> <p> The number representing the time zone offset from UTC, in minutes. If set, the <code translate="no" dir="ltr">valueMsEpoch</code> is displayed in the specified time zone. If unset, the value defaults to the user's time zone setting. </p> </td> </tr> <tr id="Message.DateTimePicker.FIELDS.on_change_action"> <td> <code translate="no" dir="ltr">on<wbr/>Change<wbr/>Action</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Action">Action</a></code>)</code> </p> <p> Triggered when the user clicks <strong>Save</strong> or <strong>Clear</strong> from the <code translate="no" dir="ltr">DateTimePicker</code> interface. </p> </td> </tr> <tr id="Message.DateTimePicker.FIELDS.validation"> <td> <code translate="no" dir="ltr">validation</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Validation">Validation</a></code>)</code> </p> <p> </p> <aside class="preview"> <strong>Developer Preview:</strong> Available as part of the <a class="external" href="https://developers.google.com/workspace/preview" target="_blank">Google Workspace Developer Preview Program</a>, which grants early access to certain features. </aside> Optional. Specify the validation required for this datetimer picker. <p> </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.DateTimePickerType"> <h3 id="datetimepickertype" data-text=" DateTimePickerType " tabindex="-1"> DateTimePickerType </h3> <section id="Message.DateTimePickerType.description"> <p> The format for the date and time in the <code translate="no" dir="ltr">DateTimePicker</code> widget. Determines whether users can input a date, a time, or both a date and time. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.DateTimePickerType.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.DateTimePickerType.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.DateTimePickerType.ENUM_VALUES.DATE_AND_TIME"> <td> <code class="apitype" translate="no" dir="ltr">DATE_AND_TIME</code> </td> <td> Users input a date and time. </td> </tr> <tr id="Message.DateTimePickerType.ENUM_VALUES.DATE_ONLY"> <td> <code class="apitype" translate="no" dir="ltr">DATE_ONLY</code> </td> <td> Users input a date. </td> </tr> <tr id="Message.DateTimePickerType.ENUM_VALUES.TIME_ONLY"> <td> <code class="apitype" translate="no" dir="ltr">TIME_ONLY</code> </td> <td> Users input a time. </td> </tr> </tbody> </table> </section> </section><section id="Message.Divider"> <h3 id="divider" data-text=" Divider " tabindex="-1"> Divider </h3> <p> This type has no fields. </p> <section id="Message.Divider.description"> <p> Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see <a href="https://developers.google.com/workspace/chat/format-structure-card-dialog#add_a_horizontal_divider_between_widgets">Add a horizontal divider between widgets</a>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> <p> For example, the following JSON creates a divider: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"divider": {} </code></pre> </section> </section><section id="Message.Grid"> <h3 id="grid" data-text=" Grid " tabindex="-1"> Grid </h3> <section id="Message.Grid.description"> <p> Displays a grid with a collection of items. Items can only include text or images. For responsive columns, or to include more than text or images, use <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Columns"><code translate="no" dir="ltr">Columns</code></a></code>. For an example in Google Chat apps, see <a href="https://developers.google.com/workspace/chat/format-structure-card-dialog#display_a_grid_with_a_collection_of_items">Display a Grid with a collection of items</a>. </p> <p> A grid supports any number of columns and items. The number of rows is determined by items divided by columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> <p> For example, the following JSON creates a 2 column grid with a single item: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } </code></pre> </section> <section id="Message.Grid.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"title"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"items"</span><span class="pun">: </span><span class="pun">[</span> <span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.GridItem">GridItem</a></code>)</span> <span class="pun">}</span> <span class="pun">]</span><span class="pun">,</span> <span class="str">"borderStyle"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.BorderStyle">BorderStyle</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"columnCount"</span><span class="pun">: </span><span class="kwd">integer</span><span class="pun">,</span> <span class="str">"onClick"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClick_1">OnClick</a></code>)</span> <span class="pun">}</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Grid.FIELDS"> <table class="properties responsive fixed" id="Message.Grid.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.Grid.FIELDS.title"> <td> <code translate="no" dir="ltr">title</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The text that displays in the grid header. </p> </td> </tr> <tr id="Message.Grid.FIELDS.items"> <td> <code translate="no" dir="ltr">items[]</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.GridItem">GridItem</a></code>)</code> </p> <p> The items to display in the grid. </p> </td> </tr> <tr id="Message.Grid.FIELDS.border_style"> <td> <code translate="no" dir="ltr">border<wbr/>Style</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.BorderStyle">BorderStyle</a></code>)</code> </p> <p> The border style to apply to each grid item. </p> </td> </tr> <tr id="Message.Grid.FIELDS.column_count"> <td> <code translate="no" dir="ltr">column<wbr/>Count</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">integer</code> </p> <p> The number of columns to display in the grid. A default value is used if this field isn't specified, and that default value is different depending on where the grid is shown (dialog versus companion). </p> </td> </tr> <tr id="Message.Grid.FIELDS.on_click"> <td> <code translate="no" dir="ltr">on<wbr/>Click</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClick_1">OnClick</a></code>)</code> </p> <p> This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.GridItem"> <h3 id="griditem" data-text=" GridItem " tabindex="-1"> GridItem </h3> <section id="Message.GridItem.description"> <p> Represents an item in a grid layout. Items can contain text, an image, or both text and an image. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.GridItem.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"id"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"image"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ImageComponent">ImageComponent</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"title"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"subtitle"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"layout"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.GridItemLayout">GridItemLayout</a></code>)</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.GridItem.FIELDS"> <table class="properties responsive fixed" id="Message.GridItem.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.GridItem.FIELDS.id"> <td> <code translate="no" dir="ltr">id</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> A user-specified identifier for this grid item. This identifier is returned in the parent grid's <code translate="no" dir="ltr">onClick</code> callback parameters. </p> </td> </tr> <tr id="Message.GridItem.FIELDS.image"> <td> <code translate="no" dir="ltr">image</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ImageComponent">ImageComponent</a></code>)</code> </p> <p> The image that displays in the grid item. </p> </td> </tr> <tr id="Message.GridItem.FIELDS.title"> <td> <code translate="no" dir="ltr">title</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The grid item's title. </p> </td> </tr> <tr id="Message.GridItem.FIELDS.subtitle"> <td> <code translate="no" dir="ltr">subtitle</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The grid item's subtitle. </p> </td> </tr> <tr id="Message.GridItem.FIELDS.layout"> <td> <code translate="no" dir="ltr">layout</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.GridItemLayout">GridItemLayout</a></code>)</code> </p> <p> The layout to use for the grid item. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.ImageComponent"> <h3 id="imagecomponent" data-text=" ImageComponent " tabindex="-1"> ImageComponent </h3> <section id="Message.ImageComponent.description"> <p> Represents an image. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.ImageComponent.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"imageUri"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"altText"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"cropStyle"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ImageCropStyle">ImageCropStyle</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"borderStyle"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.BorderStyle">BorderStyle</a></code>)</span> <span class="pun">}</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.ImageComponent.FIELDS"> <table class="properties responsive fixed" id="Message.ImageComponent.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.ImageComponent.FIELDS.image_uri"> <td> <code translate="no" dir="ltr">image<wbr/>Uri</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The image URL. </p> </td> </tr> <tr id="Message.ImageComponent.FIELDS.alt_text"> <td> <code translate="no" dir="ltr">alt<wbr/>Text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The accessibility label for the image. </p> </td> </tr> <tr id="Message.ImageComponent.FIELDS.crop_style"> <td> <code translate="no" dir="ltr">crop<wbr/>Style</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ImageCropStyle">ImageCropStyle</a></code>)</code> </p> <p> The crop style to apply to the image. </p> </td> </tr> <tr id="Message.ImageComponent.FIELDS.border_style"> <td> <code translate="no" dir="ltr">border<wbr/>Style</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.BorderStyle">BorderStyle</a></code>)</code> </p> <p> The border style to apply to the image. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.ImageCropStyle"> <h3 id="imagecropstyle" data-text=" ImageCropStyle " tabindex="-1"> ImageCropStyle </h3> <section id="Message.ImageCropStyle.description"> <p> Represents the crop style applied to an image. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> <p> For example, here's how to apply a 16:9 aspect ratio: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">cropStyle { "type": "RECTANGLE_CUSTOM", "aspectRatio": 16/9 } </code></pre> </section> <section id="Message.ImageCropStyle.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"type"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ImageCropType">ImageCropType</a></code>)</span><span class="pun">,</span> <span class="str">"aspectRatio"</span><span class="pun">: </span><span class="kwd">number</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.ImageCropStyle.FIELDS"> <table class="properties responsive fixed" id="Message.ImageCropStyle.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.ImageCropStyle.FIELDS.type"> <td> <code translate="no" dir="ltr">type</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ImageCropType">ImageCropType</a></code>)</code> </p> <p> The crop type. </p> </td> </tr> <tr id="Message.ImageCropStyle.FIELDS.aspect_ratio"> <td> <code translate="no" dir="ltr">aspect<wbr/>Ratio</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">number</code> </p> <p> The aspect ratio to use if the crop type is <code translate="no" dir="ltr">RECTANGLE_CUSTOM</code>. </p> <p> For example, here's how to apply a 16:9 aspect ratio: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">cropStyle { "type": "RECTANGLE_CUSTOM", "aspectRatio": 16/9 } </code></pre> </td> </tr> </tbody> </table> </section> </section><section id="Message.ImageCropType"> <h3 id="imagecroptype" data-text=" ImageCropType " tabindex="-1"> ImageCropType </h3> <section id="Message.ImageCropType.description"> <p> Represents the crop style applied to an image. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.ImageCropType.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.ImageCropType.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.ImageCropType.ENUM_VALUES.IMAGE_CROP_TYPE_UNSPECIFIED"> <td> <code class="apitype" translate="no" dir="ltr">IMAGE_CROP_TYPE_UNSPECIFIED</code> </td> <td> Don't use. Unspecified. </td> </tr> <tr id="Message.ImageCropType.ENUM_VALUES.SQUARE"> <td> <code class="apitype" translate="no" dir="ltr">SQUARE</code> </td> <td> Default value. Applies a square crop. </td> </tr> <tr id="Message.ImageCropType.ENUM_VALUES.CIRCLE"> <td> <code class="apitype" translate="no" dir="ltr">CIRCLE</code> </td> <td> Applies a circular crop. </td> </tr> <tr id="Message.ImageCropType.ENUM_VALUES.RECTANGLE_CUSTOM"> <td> <code class="apitype" translate="no" dir="ltr">RECTANGLE_CUSTOM</code> </td> <td> Applies a rectangular crop with a custom aspect ratio. Set the custom aspect ratio with <code translate="no" dir="ltr">aspectRatio</code>. </td> </tr> <tr id="Message.ImageCropType.ENUM_VALUES.RECTANGLE_4_3"> <td> <code class="apitype" translate="no" dir="ltr">RECTANGLE_4_3</code> </td> <td> Applies a rectangular crop with a 4:3 aspect ratio. </td> </tr> </tbody> </table> </section> </section><section id="Message.BorderStyle"> <h3 id="borderstyle" data-text=" BorderStyle " tabindex="-1"> BorderStyle </h3> <section id="Message.BorderStyle.description"> <p> The style options for the border of a card or widget, including the border type and color. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.BorderStyle.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"type"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.BorderType">BorderType</a></code>)</span><span class="pun">,</span> <span class="str">"strokeColor"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Color">Color</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"cornerRadius"</span><span class="pun">: </span><span class="kwd">integer</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.BorderStyle.FIELDS"> <table class="properties responsive fixed" id="Message.BorderStyle.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.BorderStyle.FIELDS.type"> <td> <code translate="no" dir="ltr">type</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.BorderType">BorderType</a></code>)</code> </p> <p> The border type. </p> </td> </tr> <tr id="Message.BorderStyle.FIELDS.stroke_color"> <td> <code translate="no" dir="ltr">stroke<wbr/>Color</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Color">Color</a></code>)</code> </p> <p> The colors to use when the type is <code translate="no" dir="ltr">BORDER_TYPE_STROKE</code>. </p> <p> To set the stroke color, specify a value for the <code translate="no" dir="ltr">red</code>, <code translate="no" dir="ltr">green</code>, and <code translate="no" dir="ltr">blue</code> fields. The value must be a float number between 0 and 1 based on the RGB color value, where <code translate="no" dir="ltr">0</code> (0/255) represents the absence of color and <code translate="no" dir="ltr">1</code> (255/255) represents the maximum intensity of the color. </p> <p> For example, the following sets the color to red at its maximum intensity: </p> <pre translate="no" dir="ltr"><code translate="no" dir="ltr">"color": { "red": 1, "green": 0, "blue": 0, } </code></pre> <p> The <code translate="no" dir="ltr">alpha</code> field is unavailable for stroke color. If specified, this field is ignored. </p> </td> </tr> <tr id="Message.BorderStyle.FIELDS.corner_radius"> <td> <code translate="no" dir="ltr">corner<wbr/>Radius</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">integer</code> </p> <p> The corner radius for the border. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.BorderType"> <h3 id="bordertype" data-text=" BorderType " tabindex="-1"> BorderType </h3> <section id="Message.BorderType.description"> <p> Represents the border types applied to widgets. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.BorderType.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.BorderType.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.BorderType.ENUM_VALUES.BORDER_TYPE_UNSPECIFIED"> <td> <code class="apitype" translate="no" dir="ltr">BORDER_TYPE_UNSPECIFIED</code> </td> <td> Don't use. Unspecified. </td> </tr> <tr id="Message.BorderType.ENUM_VALUES.NO_BORDER"> <td> <code class="apitype" translate="no" dir="ltr">NO_BORDER</code> </td> <td> Default value. No border. </td> </tr> <tr id="Message.BorderType.ENUM_VALUES.STROKE"> <td> <code class="apitype" translate="no" dir="ltr">STROKE</code> </td> <td> Outline. </td> </tr> </tbody> </table> </section> </section><section id="Message.GridItemLayout"> <h3 id="griditemlayout" data-text=" GridItemLayout " tabindex="-1"> GridItemLayout </h3> <section id="Message.GridItemLayout.description"> <p> Represents the various layout options available for a grid item. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.GridItemLayout.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.GridItemLayout.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.GridItemLayout.ENUM_VALUES.GRID_ITEM_LAYOUT_UNSPECIFIED"> <td> <code class="apitype" translate="no" dir="ltr">GRID_ITEM_LAYOUT_UNSPECIFIED</code> </td> <td> Don't use. Unspecified. </td> </tr> <tr id="Message.GridItemLayout.ENUM_VALUES.TEXT_BELOW"> <td> <code class="apitype" translate="no" dir="ltr">TEXT_BELOW</code> </td> <td> The title and subtitle are shown below the grid item's image. </td> </tr> <tr id="Message.GridItemLayout.ENUM_VALUES.TEXT_ABOVE"> <td> <code class="apitype" translate="no" dir="ltr">TEXT_ABOVE</code> </td> <td> The title and subtitle are shown above the grid item's image. </td> </tr> </tbody> </table> </section> </section><section id="Message.Columns"> <h3 id="columns" data-text=" Columns " tabindex="-1"> Columns </h3> <section id="Message.Columns.description"> <p> The <code translate="no" dir="ltr">Columns</code> widget displays up to 2 columns in a card or dialog. You can add widgets to each column; the widgets appear in the order that they are specified. For an example in Google Chat apps, see <a href="https://developers.google.com/workspace/chat/format-structure-card-dialog#display_cards_and_dialogs_in_columns">Display cards and dialogs in columns</a>. </p> <p> The height of each column is determined by the taller column. For example, if the first column is taller than the second column, both columns have the height of the first column. Because each column can contain a different number of widgets, you can't define rows or align widgets between the columns. </p> <p> Columns are displayed side-by-side. You can customize the width of each column using the <code translate="no" dir="ltr">HorizontalSizeStyle</code> field. If the user's screen width is too narrow, the second column wraps below the first: </p> <ul> <li> On web, the second column wraps if the screen width is less than or equal to 480 pixels. </li> <li> On iOS devices, the second column wraps if the screen width is less than or equal to 300 pt. </li> <li> On Android devices, the second column wraps if the screen width is less than or equal to 320 dp. </li> </ul> <p> To include more than two columns, or to use rows, use the <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Grid"><code translate="no" dir="ltr">Grid</code></a></code> widget. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. The add-on UIs that support columns include: </p> <ul> <li> The dialog displayed when users open the add-on from an email draft. </li> <li> The dialog displayed when users open the add-on from the <strong>Add attachment</strong> menu in a Google Calendar event. </li> </ul> </section> <section id="Message.Columns.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"columnItems"</span><span class="pun">: </span><span class="pun">[</span> <span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Column">Column</a></code>)</span> <span class="pun">}</span> <span class="pun">]</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Columns.FIELDS"> <table class="properties responsive fixed" id="Message.Columns.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.Columns.FIELDS.column_items"> <td> <code translate="no" dir="ltr">column<wbr/>Items[]</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Column">Column</a></code>)</code> </p> <p> An array of columns. You can include up to 2 columns in a card or dialog. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.Column"> <h3 id="column" data-text=" Column " tabindex="-1"> Column </h3> <section id="Message.Column.description"> <p> A column. </p> <p> <a href="https://developers.google.com/workspace/extend">Google Workspace Add-ons and Chat apps</a> </p> </section> <section id="Message.Column.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"horizontalSizeStyle"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.HorizontalSizeStyle">HorizontalSizeStyle</a></code>)</span><span class="pun">,</span> <span class="str">"horizontalAlignment"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.HorizontalAlignment">HorizontalAlignment</a></code>)</span><span class="pun">,</span> <span class="str">"verticalAlignment"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.VerticalAlignment">VerticalAlignment</a></code>)</span><span class="pun">,</span> <span class="str">"widgets"</span><span class="pun">: </span><span class="pun">[</span> <span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Widgets">Widgets</a></code>)</span> <span class="pun">}</span> <span class="pun">]</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Column.FIELDS"> <table class="properties responsive fixed" id="Message.Column.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.Column.FIELDS.horizontal_size_style"> <td> <code translate="no" dir="ltr">horizontal<wbr/>Size<wbr/>Style</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.HorizontalSizeStyle">HorizontalSizeStyle</a></code>)</code> </p> <p> Specifies how a column fills the width of the card. </p> </td> </tr> <tr id="Message.Column.FIELDS.horizontal_alignment"> <td> <code translate="no" dir="ltr">horizontal<wbr/>Alignment</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.HorizontalAlignment">HorizontalAlignment</a></code>)</code> </p> <p> Specifies whether widgets align to the left, right, or center of a column. </p> </td> </tr> <tr id="Message.Column.FIELDS.vertical_alignment"> <td> <code translate="no" dir="ltr">vertical<wbr/>Alignment</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.VerticalAlignment">VerticalAlignment</a></code>)</code> </p> <p> Specifies whether widgets align to the top, bottom, or center of a column. </p> </td> </tr> <tr id="Message.Column.FIELDS.widgets"> <td> <code translate="no" dir="ltr">widgets[]</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Widgets">Widgets</a></code>)</code> </p> <p> An array of widgets included in a column. Widgets appear in the order that they are specified. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.HorizontalSizeStyle"> <h3 id="horizontalsizestyle" data-text=" HorizontalSizeStyle " tabindex="-1"> HorizontalSizeStyle </h3> <section id="Message.HorizontalSizeStyle.description"> <p> Specifies how a column fills the width of the card. The width of each column depends on both the <code translate="no" dir="ltr">HorizontalSizeStyle</code> and the width of the widgets within the column. </p> <p> <a href="https://developers.google.com/workspace/extend">Google Workspace Add-ons and Chat apps</a> </p> </section> <section id="Message.HorizontalSizeStyle.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.HorizontalSizeStyle.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.HorizontalSizeStyle.ENUM_VALUES.HORIZONTAL_SIZE_STYLE_UNSPECIFIED"> <td> <code class="apitype" translate="no" dir="ltr">HORIZONTAL_SIZE_STYLE_UNSPECIFIED</code> </td> <td> Don't use. Unspecified. </td> </tr> <tr id="Message.HorizontalSizeStyle.ENUM_VALUES.FILL_AVAILABLE_SPACE"> <td> <code class="apitype" translate="no" dir="ltr">FILL_AVAILABLE_SPACE</code> </td> <td> Default value. Column fills the available space, up to 70% of the card's width. If both columns are set to <code translate="no" dir="ltr">FILL_AVAILABLE_SPACE</code>, each column fills 50% of the space. </td> </tr> <tr id="Message.HorizontalSizeStyle.ENUM_VALUES.FILL_MINIMUM_SPACE"> <td> <code class="apitype" translate="no" dir="ltr">FILL_MINIMUM_SPACE</code> </td> <td> Column fills the least amount of space possible and no more than 30% of the card's width. </td> </tr> </tbody> </table> </section> </section><section id="Message.HorizontalAlignment"> <h3 id="horizontalalignment" data-text=" HorizontalAlignment " tabindex="-1"> HorizontalAlignment </h3> <section id="Message.HorizontalAlignment.description"> <p> Specifies whether widgets align to the left, right, or center of a column. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </section> <section id="Message.HorizontalAlignment.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.HorizontalAlignment.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.HorizontalAlignment.ENUM_VALUES.HORIZONTAL_ALIGNMENT_UNSPECIFIED"> <td> <code class="apitype" translate="no" dir="ltr">HORIZONTAL_ALIGNMENT_UNSPECIFIED</code> </td> <td> Don't use. Unspecified. </td> </tr> <tr id="Message.HorizontalAlignment.ENUM_VALUES.START"> <td> <code class="apitype" translate="no" dir="ltr">START</code> </td> <td> Default value. Aligns widgets to the start position of the column. For left-to-right layouts, aligns to the left. For right-to-left layouts, aligns to the right. </td> </tr> <tr id="Message.HorizontalAlignment.ENUM_VALUES.CENTER"> <td> <code class="apitype" translate="no" dir="ltr">CENTER</code> </td> <td> Aligns widgets to the center of the column. </td> </tr> <tr id="Message.HorizontalAlignment.ENUM_VALUES.END"> <td> <code class="apitype" translate="no" dir="ltr">END</code> </td> <td> Aligns widgets to the end position of the column. For left-to-right layouts, aligns widgets to the right. For right-to-left layouts, aligns widgets to the left. </td> </tr> </tbody> </table> </section> </section><section id="Message.VerticalAlignment"> <h3 id="verticalalignment" data-text=" VerticalAlignment " tabindex="-1"> VerticalAlignment </h3> <section id="Message.VerticalAlignment.description"> <p> Specifies whether widgets align to the top, bottom, or center of a column. </p> <p> <a href="https://developers.google.com/workspace/extend">Google Workspace Add-ons and Chat apps</a> </p> </section> <section id="Message.VerticalAlignment.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.VerticalAlignment.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.VerticalAlignment.ENUM_VALUES.VERTICAL_ALIGNMENT_UNSPECIFIED"> <td> <code class="apitype" translate="no" dir="ltr">VERTICAL_ALIGNMENT_UNSPECIFIED</code> </td> <td> Don't use. Unspecified. </td> </tr> <tr id="Message.VerticalAlignment.ENUM_VALUES.CENTER"> <td> <code class="apitype" translate="no" dir="ltr">CENTER</code> </td> <td> Default value. Aligns widgets to the center of a column. </td> </tr> <tr id="Message.VerticalAlignment.ENUM_VALUES.TOP"> <td> <code class="apitype" translate="no" dir="ltr">TOP</code> </td> <td> Aligns widgets to the top of a column. </td> </tr> <tr id="Message.VerticalAlignment.ENUM_VALUES.BOTTOM"> <td> <code class="apitype" translate="no" dir="ltr">BOTTOM</code> </td> <td> Aligns widgets to the bottom of a column. </td> </tr> </tbody> </table> </section> </section><section id="Message.Widgets"> <h3 id="widgets" data-text=" Widgets " tabindex="-1"> Widgets </h3> <section id="Message.Widgets.description"> <p> The supported widgets that you can include in a column. </p> <p> <a href="https://developers.google.com/workspace/extend">Google Workspace Add-ons and Chat apps</a> </p> </section> <section id="Message.Widgets.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="com">// Union field <code translate="no" dir="ltr">data</code> can be only one of the following:</span> <span class="str">"textParagraph"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.TextParagraph_1">TextParagraph</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"image"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Image_1">Image</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"decoratedText"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DecoratedText">DecoratedText</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"buttonList"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ButtonList">ButtonList</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"textInput"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.TextInput">TextInput</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"selectionInput"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SelectionInput">SelectionInput</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"dateTimePicker"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DateTimePicker">DateTimePicker</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"chipList"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ChipList">ChipList</a></code>)</span> <span class="pun">}</span> <span class="com">// End of list of possible types for union field <code translate="no" dir="ltr">data</code>.</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Widgets.FIELDS"> <table class="properties responsive fixed" id="Message.Widgets.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr class="alt" id="Message.Widgets.FIELDS.oneof_data"> <td colspan="2"> <p> Union field <code translate="no" dir="ltr">data</code>. </p> <p> <code translate="no" dir="ltr">data</code> can be only one of the following: </p> </td> </tr> <tr id="Message.Widgets.FIELDS.text_paragraph"> <td> <code translate="no" dir="ltr">text<wbr/>Paragraph</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.TextParagraph_1">TextParagraph</a></code>)</code> </p> <p> <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.TextParagraph_1">TextParagraph</a></code> widget. </p> </td> </tr> <tr id="Message.Widgets.FIELDS.image"> <td> <code translate="no" dir="ltr">image</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Image_1">Image</a></code>)</code> </p> <p> <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Image_1">Image</a></code> widget. </p> </td> </tr> <tr id="Message.Widgets.FIELDS.decorated_text"> <td> <code translate="no" dir="ltr">decorated<wbr/>Text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DecoratedText">DecoratedText</a></code>)</code> </p> <p> <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DecoratedText">DecoratedText</a></code> widget. </p> </td> </tr> <tr id="Message.Widgets.FIELDS.button_list"> <td> <code translate="no" dir="ltr">button<wbr/>List</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ButtonList">ButtonList</a></code>)</code> </p> <p> <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ButtonList">ButtonList</a></code> widget. </p> </td> </tr> <tr id="Message.Widgets.FIELDS.text_input"> <td> <code translate="no" dir="ltr">text<wbr/>Input</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.TextInput">TextInput</a></code>)</code> </p> <p> <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.TextInput">TextInput</a></code> widget. </p> </td> </tr> <tr id="Message.Widgets.FIELDS.selection_input"> <td> <code translate="no" dir="ltr">selection<wbr/>Input</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SelectionInput">SelectionInput</a></code>)</code> </p> <p> <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.SelectionInput">SelectionInput</a></code> widget. </p> </td> </tr> <tr id="Message.Widgets.FIELDS.date_time_picker"> <td> <code translate="no" dir="ltr">date<wbr/>Time<wbr/>Picker</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DateTimePicker">DateTimePicker</a></code>)</code> </p> <p> <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.DateTimePicker">DateTimePicker</a></code> widget. </p> </td> </tr> <tr id="Message.Widgets.FIELDS.chip_list"> <td> <code translate="no" dir="ltr">chip<wbr/>List</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ChipList">ChipList</a></code>)</code> </p> <p> <code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.ChipList">ChipList</a></code> widget. <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.ChipList"> <h3 id="chiplist" data-text=" ChipList " tabindex="-1"> ChipList </h3> <section id="Message.ChipList.description"> <p> A list of chips layed out horizontally, which can either scroll horizontally or wrap to the next line. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </section> <section id="Message.ChipList.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"layout"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Layout">Layout</a></code>)</span><span class="pun">,</span> <span class="str">"chips"</span><span class="pun">: </span><span class="pun">[</span> <span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Chip">Chip</a></code>)</span> <span class="pun">}</span> <span class="pun">]</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.ChipList.FIELDS"> <table class="properties responsive fixed" id="Message.ChipList.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.ChipList.FIELDS.layout"> <td> <code translate="no" dir="ltr">layout</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Layout">Layout</a></code>)</code> </p> <p> Specified chip list layout. </p> </td> </tr> <tr id="Message.ChipList.FIELDS.chips"> <td> <code translate="no" dir="ltr">chips[]</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Chip">Chip</a></code>)</code> </p> <p> An array of chips. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.Layout"> <h3 id="layout" data-text=" Layout " tabindex="-1"> Layout </h3> <section id="Message.Layout.description"> <p> The chip list layout. </p> </section> <section id="Message.Layout.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.Layout.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.Layout.ENUM_VALUES.LAYOUT_UNSPECIFIED"> <td> <code class="apitype" translate="no" dir="ltr">LAYOUT_UNSPECIFIED</code> </td> <td> Don't use. Unspecified. </td> </tr> <tr id="Message.Layout.ENUM_VALUES.WRAPPED"> <td> <code class="apitype" translate="no" dir="ltr">WRAPPED</code> </td> <td> Default value. The chip list wraps to the next line if there isn't enough horizontal space. </td> </tr> <tr id="Message.Layout.ENUM_VALUES.HORIZONTAL_SCROLLABLE"> <td> <code class="apitype" translate="no" dir="ltr">HORIZONTAL_SCROLLABLE</code> </td> <td> The chips scroll horizontally if they don't fit in the available space. </td> </tr> </tbody> </table> </section> </section><section id="Message.Chip"> <h3 id="chip" data-text=" Chip " tabindex="-1"> Chip </h3> <section id="Message.Chip.description"> <p> A text, icon, or text and icon chip that users can click. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </section> <section id="Message.Chip.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"icon"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Icon_1">Icon</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"label"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"onClick"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClick_1">OnClick</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"enabled"</span><span class="pun">: </span><span class="kwd">boolean</span><span class="pun">,</span> <span class="str">"disabled"</span><span class="pun">: </span><span class="kwd">boolean</span><span class="pun">,</span> <span class="str">"altText"</span><span class="pun">: </span><span class="kwd">string</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.Chip.FIELDS"> <table class="properties responsive fixed" id="Message.Chip.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.Chip.FIELDS.icon"> <td> <code translate="no" dir="ltr">icon</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Icon_1">Icon</a></code>)</code> </p> <p> The icon image. If both <code translate="no" dir="ltr">icon</code> and <code translate="no" dir="ltr">text</code> are set, then the icon appears before the text. </p> </td> </tr> <tr id="Message.Chip.FIELDS.label"> <td> <code translate="no" dir="ltr">label</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The text displayed inside the chip. </p> </td> </tr> <tr id="Message.Chip.FIELDS.on_click"> <td> <code translate="no" dir="ltr">on<wbr/>Click</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClick_1">OnClick</a></code>)</code> </p> <p> Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function. </p> </td> </tr> <tr id="Message.Chip.FIELDS.enabled"> <td> <code translate="no" dir="ltr">enabled <br/> <b> (deprecated) </b></code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">boolean</code> </p> <aside class="warning"> <p> This item is deprecated! </p> </aside> <p> Whether the chip is in an active state and responds to user actions. Defaults to <code translate="no" dir="ltr">true</code>. Deprecated. Use <code translate="no" dir="ltr">disabled</code> instead. </p> </td> </tr> <tr id="Message.Chip.FIELDS.disabled"> <td> <code translate="no" dir="ltr">disabled</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">boolean</code> </p> <p> Whether the chip is in an inactive state and ignores user actions. Defaults to <code translate="no" dir="ltr">false</code>. </p> </td> </tr> <tr id="Message.Chip.FIELDS.alt_text"> <td> <code translate="no" dir="ltr">alt<wbr/>Text</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The alternative text that's used for accessibility. </p> <p> Set descriptive text that lets users know what the chip does. For example, if a chip opens a hyperlink, write: "Opens a new browser tab and navigates to the Google Chat developer documentation at <a "="" href="https://developers.google.com/workspace/chat">https://developers.google.com/workspace/chat"</a>. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.CollapseControl"> <h3 id="collapsecontrol" data-text=" CollapseControl " tabindex="-1"> CollapseControl </h3> <section id="Message.CollapseControl.description"> <p> Represent an expand and collapse control. <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> Available for Google Chat apps and unavailable for Google Workspace Add-ons. </p> </section> <section id="Message.CollapseControl.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"horizontalAlignment"</span><span class="pun">: </span><span class="kwd">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.HorizontalAlignment">HorizontalAlignment</a></code>)</span><span class="pun">,</span> <span class="str">"expandButton"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Button_1">Button</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"collapseButton"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Button_1">Button</a></code>)</span> <span class="pun">}</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.CollapseControl.FIELDS"> <table class="properties responsive fixed" id="Message.CollapseControl.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.CollapseControl.FIELDS.horizontal_alignment"> <td> <code translate="no" dir="ltr">horizontal<wbr/>Alignment</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">enum (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.HorizontalAlignment">HorizontalAlignment</a></code>)</code> </p> <p> The horizontal alignment of the expand and collapse button. </p> </td> </tr> <tr id="Message.CollapseControl.FIELDS.expand_button"> <td> <code translate="no" dir="ltr">expand<wbr/>Button</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Button_1">Button</a></code>)</code> </p> <p> Optional. Define a customizable button to expand the section. Both expandButton and collapseButton field must be set. Only one field set will not take into effect. If this field isn't set, the default button is used. </p> </td> </tr> <tr id="Message.CollapseControl.FIELDS.collapse_button"> <td> <code translate="no" dir="ltr">collapse<wbr/>Button</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Button_1">Button</a></code>)</code> </p> <p> Optional. Define a customizable button to collapse the section. Both expandButton and collapseButton field must be set. Only one field set will not take into effect. If this field isn't set, the default button is used. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.DividerStyle"> <h3 id="dividerstyle" data-text=" DividerStyle " tabindex="-1"> DividerStyle </h3> <section id="Message.DividerStyle.description"> <p> The divider style of a card. Currently only used for dividers betweens card sections. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.DividerStyle.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.DividerStyle.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.DividerStyle.ENUM_VALUES.DIVIDER_STYLE_UNSPECIFIED"> <td> <code class="apitype" translate="no" dir="ltr">DIVIDER_STYLE_UNSPECIFIED</code> </td> <td> Don't use. Unspecified. </td> </tr> <tr id="Message.DividerStyle.ENUM_VALUES.SOLID_DIVIDER"> <td> <code class="apitype" translate="no" dir="ltr">SOLID_DIVIDER</code> </td> <td> Default option. Render a solid divider. </td> </tr> <tr id="Message.DividerStyle.ENUM_VALUES.NO_DIVIDER"> <td> <code class="apitype" translate="no" dir="ltr">NO_DIVIDER</code> </td> <td> If set, no divider is rendered. This style completely removes the divider from the layout. The result is equivalent to not adding a divider at all. </td> </tr> </tbody> </table> </section> </section><section id="Message.CardAction_1"> <h3 id="cardaction" data-text=" CardAction " tabindex="-1"> CardAction </h3> <section id="Message.CardAction_1.description"> <p> A card action is the action associated with the card. For example, an invoice card might include actions such as delete invoice, email invoice, or open the invoice in a browser. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Workspace Add-ons and unavailable for Google Chat apps. </p> </section> <section id="Message.CardAction_1.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"actionLabel"</span><span class="pun">: </span><span class="kwd">string</span><span class="pun">,</span> <span class="str">"onClick"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClick_1">OnClick</a></code>)</span> <span class="pun">}</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.CardAction_1.FIELDS"> <table class="properties responsive fixed" id="Message.CardAction_1.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.CardAction_1.FIELDS.action_label"> <td> <code translate="no" dir="ltr">action<wbr/>Label</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">string</code> </p> <p> The label that displays as the action menu item. </p> </td> </tr> <tr id="Message.CardAction_1.FIELDS.on_click"> <td> <code translate="no" dir="ltr">on<wbr/>Click</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.OnClick_1">OnClick</a></code>)</code> </p> <p> The <code translate="no" dir="ltr">onClick</code> action for this action item. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.CardFixedFooter"> <h3 id="cardfixedfooter" data-text=" CardFixedFooter " tabindex="-1"> CardFixedFooter </h3> <section id="Message.CardFixedFooter.description"> <p> A persistent (sticky) footer that that appears at the bottom of the card. </p> <p> Setting <code translate="no" dir="ltr">fixedFooter</code> without specifying a <code translate="no" dir="ltr">primaryButton</code> or a <code translate="no" dir="ltr">secondaryButton</code> causes an error. </p> <p> For Chat apps, you can use fixed footers in <a href="https://developers.google.com/workspace/chat/dialogs">dialogs</a>, but not <a href="https://developers.google.com/workspace/chat/create-messages#create">card messages</a>. For an example in Google Chat apps, see <a href="https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_persistent_footer">Add a persistent footer</a>. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg"> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Chat apps and Google Workspace Add-ons. </p> </section> <section id="Message.CardFixedFooter.SCHEMA_REPRESENTATION"> <table class="properties responsive fixed"> <thead> <tr> <th> JSON representation </th> </tr> </thead> <tbody> <tr> <td style="margin:0;padding:0;"> <pre style="border: 0;margin: 0;" translate="no" dir="ltr"><span class="pun">{</span> <span class="str">"primaryButton"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Button_1">Button</a></code>)</span> <span class="pun">}</span><span class="pun">,</span> <span class="str">"secondaryButton"</span><span class="pun">: </span><span class="pun">{</span> <span class="kwd">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Button_1">Button</a></code>)</span> <span class="pun">}</span> <span class="pun">}</span></pre> </td> </tr> </tbody> </table> </section> <section id="Message.CardFixedFooter.FIELDS"> <table class="properties responsive fixed" id="Message.CardFixedFooter.FIELDS-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Fields </th> </tr> </thead> <tbody> <tr id="Message.CardFixedFooter.FIELDS.primary_button"> <td> <code translate="no" dir="ltr">primary<wbr/>Button</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Button_1">Button</a></code>)</code> </p> <p> The primary button of the fixed footer. The button must be a text button with text and color set. </p> </td> </tr> <tr id="Message.CardFixedFooter.FIELDS.secondary_button"> <td> <code translate="no" dir="ltr">secondary<wbr/>Button</code> </td> <td> <p> <code class="apitype" translate="no" dir="ltr">object (<code translate="no" dir="ltr"><a href="/workspace/chat/api/reference/rest/v1/cards#Message.Button_1">Button</a></code>)</code> </p> <p> The secondary button of the fixed footer. The button must be a text button with text and color set. If <code translate="no" dir="ltr">secondaryButton</code> is set, you must also set <code translate="no" dir="ltr">primaryButton</code>. </p> </td> </tr> </tbody> </table> </section> </section><section id="Message.DisplayStyle"> <h3 id="displaystyle" data-text=" DisplayStyle " tabindex="-1"> DisplayStyle </h3> <section id="Message.DisplayStyle.description"> <p> In Google Workspace Add-ons, determines how a card is displayed. </p> <p> <img alt class="inline-icon" src="https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg"> Available for Google Workspace Add-ons and unavailable for Google Chat apps. </p> </section> <section id="Message.DisplayStyle.ENUM_VALUES"> <table class="constants responsive fixed" id="Message.DisplayStyle.ENUM_VALUES-table"> <colgroup> <col width="25%"/> <col/> </colgroup> <thead> <tr> <th colspan="2"> Enums </th> </tr> </thead> <tbody> <tr id="Message.DisplayStyle.ENUM_VALUES.DISPLAY_STYLE_UNSPECIFIED"> <td> <code class="apitype" translate="no" dir="ltr">DISPLAY_STYLE_UNSPECIFIED</code> </td> <td> Don't use. Unspecified. </td> </tr> <tr id="Message.DisplayStyle.ENUM_VALUES.PEEK"> <td> <code class="apitype" translate="no" dir="ltr">PEEK</code> </td> <td> The header of the card appears at the bottom of the sidebar, partially covering the current top card of the stack. Clicking the header pops the card into the card stack. If the card has no header, a generated header is used instead. </td> </tr> <tr id="Message.DisplayStyle.ENUM_VALUES.REPLACE"> <td> <code class="apitype" translate="no" dir="ltr">REPLACE</code> </td> <td> Default value. The card is shown by replacing the view of the top card in the card stack. </td> </tr> </tbody> </table> </section> </section> <devsite-hats-survey class="nocontent" hats-id="SrQ6jyjMz0eGRuQsCn30Qs2P7pj5" listnr-id="717201"></devsite-hats-survey> </div> <devsite-recommendations display="in-page" hidden yield> </devsite-recommendations> <devsite-thumb-rating position="footer"> </devsite-thumb-rating> <devsite-feedback position="footer" project-name="Google Chat" product-id="717201" bucket="google-chat" context="" version="t-devsite-webserver-20241114-r00-rc02.464922260396498922" data-label="Send Feedback Button" track-type="feedback" track-name="sendFeedbackLink" track-metadata-position="footer" class="nocontent" project-feedback-url="https://issuetracker.google.com/issues/new?component=350158&template=1047215" project-icon="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v2/web-64dp/logo_chat_2023q4_color_1x_web_64dp.png" project-support-url="https://developers.google.com/workspace/chat/support" > <button> Send feedback </button> </devsite-feedback> <devsite-recommendations id="recommendations-link" yield></devsite-recommendations> <div class="devsite-floating-action-buttons"> </div> </article> <devsite-content-footer class="nocontent"> <p>Except as otherwise noted, the content of this page is licensed under the <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 License</a>, and code samples are licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 License</a>. For details, see the <a href="https://developers.google.com/site-policies">Google Developers Site Policies</a>. Java is a registered trademark of Oracle and/or its affiliates.</p> <p>Last updated 2024-11-22 UTC.</p> </devsite-content-footer> <devsite-notification > </devsite-notification> <div class="devsite-content-data"> <template class="devsite-thumb-rating-feedback"> <devsite-feedback position="thumb-rating" project-name="Google Chat" product-id="717201" bucket="google-chat" context="" version="t-devsite-webserver-20241114-r00-rc02.464922260396498922" data-label="Send Feedback Button" track-type="feedback" track-name="sendFeedbackLink" track-metadata-position="thumb-rating" class="nocontent" project-feedback-url="https://issuetracker.google.com/issues/new?component=350158&template=1047215" project-icon="https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v2/web-64dp/logo_chat_2023q4_color_1x_web_64dp.png" project-support-url="https://developers.google.com/workspace/chat/support" > <button> Need to tell us more? </button> </devsite-feedback> </template> <template class="devsite-content-data-template"> [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-22 UTC."],[],[]] </template> </div> </devsite-content> </main> <devsite-footer-promos class="devsite-footer"> <nav class="devsite-footer-promos nocontent" aria-label="Promotions"> <ul class="devsite-footer-promos-list"> <li class="devsite-footer-promo"> <a href="https://developers.googleblog.com/search/?query=Google+Workspace" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" target="_blank" data-label="Promo - Google Workspace Developers Blog" data-category="Workspace Footer" > <picture> <img class="devsite-footer-promo-icon" src="https://www.gstatic.com/images/branding/product/2x/google_cloud_64dp.png" loading="lazy" alt="Blog"> </picture> <span class="devsite-footer-promo-label"> Blog </span> </a> <div class="devsite-footer-promo-description">Read the Google Workspace Developers blog</div> </li> <li class="devsite-footer-promo"> <a href="https://twitter.com/workspacedevs" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-category="Workspace Footer" target="_blank" data-label="Promo - Google Workspace on X (Twitter)" > <picture> <img class="devsite-footer-promo-icon" src="/static/site-assets/logo-x.svg" loading="lazy" alt="X (Twitter)"> </picture> <span class="devsite-footer-promo-label"> X (Twitter) </span> </a> <div class="devsite-footer-promo-description">Follow @workspacedevs on X (Twitter)</div> </li> <li class="devsite-footer-promo"> <a href="https://github.com/googleworkspace" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Promo - Google Workspace Github" data-category="Workspace Footer" target="_blank" > <picture> <img class="devsite-footer-promo-icon" src="/static/site-assets/logo-github.svg" loading="lazy" alt="Code Samples"> </picture> <span class="devsite-footer-promo-label"> Code Samples </span> </a> <div class="devsite-footer-promo-description">Explore our sample apps or copy them to build your own</div> </li> <li class="devsite-footer-promo"> <a href="https://codelabs.developers.google.com/?product=googleworkspace" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" target="_blank" data-label="Promo - Google Workspace Codelabs" data-category="Workspace Footer" > <picture> <img class="devsite-footer-promo-icon" src="/static/site-assets/developers-logo-color.svg" loading="lazy" alt="Codelabs"> </picture> <span class="devsite-footer-promo-label"> Codelabs </span> </a> <div class="devsite-footer-promo-description">Try a guided, hands-on coding experience</div> </li> <li class="devsite-footer-promo"> <a href="https://www.youtube.com/channel/UCUcg6az6etU_gRtZVAhBXaw" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Promo - Google Workspace on YouTube" data-category="Workspace Footer" target="_blank" > <picture> <img class="devsite-footer-promo-icon" src="/static/site-assets/logo-youtube.svg" loading="lazy" alt="Videos"> </picture> <span class="devsite-footer-promo-label"> Videos </span> </a> <div class="devsite-footer-promo-description">Subscribe to our YouTube channel</div> </li> </ul> </nav> </devsite-footer-promos> <devsite-footer-linkboxes class="devsite-footer"> <nav class="devsite-footer-linkboxes nocontent" aria-label="Footer links"> <ul class="devsite-footer-linkboxes-list"> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Google Workspace for Developers</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/workspace" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-category="Workspace Footer"data-label="Linkbox - Platform overview"> Platform overview </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/workspace/products" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Linkbox - Developer products"data-category="Workspace Footer"> Developer products </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/workspace/support" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Linkbox - Developer support"data-category="Workspace Footer"> Developer support </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/workspace/terms" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-category="Workspace Footer"data-label="Linkbox - Terms of Service"> Terms of Service </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Tools</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="https://admin.google.com/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" target="admin-console"data-label="Linkbox - Admin console"data-category="Workspace Footer"> Admin console </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://script.google.com/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Linkbox - Apps Script Dashboard"target="_blank"data-category="Workspace Footer"> Apps Script Dashboard </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://console.cloud.google.com/workspace-api" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Linkbox - Google Cloud console"target="console"data-category="Workspace Footer"> Google Cloud console </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/workspace/explore" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-category="Workspace Footer"data-label="Linkbox - APIs Explorer"> APIs Explorer </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Connect</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="https://developers.googleblog.com/search/?query=Google+Workspace" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-category="Workspace Footer"target="_blank"data-label="Linkbox - Blog"> Blog </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/workspace/newsletters" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-category="Workspace Footer"data-label="Linkbox - Newsletter"> Newsletter </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://twitter.com/workspacedevs" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Linkbox - X (Twitter)"target="_blank"data-category="Workspace Footer"> X (Twitter) </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://www.youtube.com/channel/UCUcg6az6etU_gRtZVAhBXaw" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-category="Workspace Footer"target="_blank"data-label="Linkbox - YouTube"> YouTube </a> </li> </ul> </li> </ul> </nav> </devsite-footer-linkboxes> <devsite-footer-utility class="devsite-footer"> <div class="devsite-footer-utility nocontent"> <nav class="devsite-footer-sites" aria-label="Other Google Developers websites"> <a href="https://developers.google.com/" class="devsite-footer-sites-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google Developers Link"> <picture> <img class="devsite-footer-sites-logo" src="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/lockup-google-for-developers.svg" loading="lazy" alt="Google Developers"> </picture> </a> <ul class="devsite-footer-sites-list"> <li class="devsite-footer-sites-item"> <a href="//developer.android.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Android Link" > Android </a> </li> <li class="devsite-footer-sites-item"> <a href="//developer.chrome.com/home" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Chrome Link" > Chrome </a> </li> <li class="devsite-footer-sites-item"> <a href="//firebase.google.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Firebase Link" > Firebase </a> </li> <li class="devsite-footer-sites-item"> <a href="//cloud.google.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google Cloud Platform Link" > Google Cloud Platform </a> </li> <li class="devsite-footer-sites-item"> <a href="//ai.google.dev/" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google AI Link" > Google AI </a> </li> <li class="devsite-footer-sites-item"> <a href="/products" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer All products Link" > All products </a> </li> </ul> </nav> <nav class="devsite-footer-utility-links" aria-label="Utility links"> <ul class="devsite-footer-utility-list"> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="/terms/site-terms" data-category="Site-Wide Custom Events" data-label="Footer Terms link" > Terms </a> </li> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="//policies.google.com/privacy" data-category="Site-Wide Custom Events" data-label="Footer Privacy link" > Privacy </a> </li> <li class="devsite-footer-utility-item glue-cookie-notification-bar-control"> <a class="devsite-footer-utility-link gc-analytics-event" href="#" data-category="Site-Wide Custom Events" data-label="Footer Manage cookies link" aria-hidden="true" > Manage cookies </a> </li> <li class="devsite-footer-utility-item devsite-footer-utility-button"> <span class="devsite-footer-utility-description">Sign up for the Google for Developers newsletter</span> <a class="devsite-footer-utility-link gc-analytics-event" href="/newsletter/subscribe" data-category="Site-Wide Custom Events" data-label="Footer Subscribe link" > Subscribe </a> </li> </ul> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es" >Español</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> </nav> </div> </devsite-footer-utility> <devsite-panel></devsite-panel> <devsite-concierge data-info-panel data-ai-panel data-api-explorer-panel > </devsite-concierge> </section></section> <devsite-sitemask></devsite-sitemask> <devsite-snackbar></devsite-snackbar> <devsite-tooltip ></devsite-tooltip> <devsite-heading-link></devsite-heading-link> <devsite-analytics> <script type="application/json" analytics>[{"dimensions": {"dimension6": "en", "dimension1": "Signed out", "dimension11": false, "dimension5": "en", "dimension3": false, "dimension4": "Google Chat"}, "gaid": "UA-24532603-1", "metrics": {"ratings_count": "metric2", "ratings_value": "metric1"}, "purpose": 1}]</script> <script type="application/json" tag-management>{"at": "True", "ga4": [{"id": "G-272J68FCRF", "purpose": 1}, {"id": "G-YYP88VSJWR", "purpose": 0}], "ga4p": [{"id": "G-272J68FCRF", "purpose": 1}], "gtm": [], "parameters": {"internalUser": "False", "language": {"machineTranslated": "False", "requested": "en", "served": "en"}, "pageType": "reference", "projectName": "Google Chat", "signedIn": "False", "tenant": "developers", "recommendations": {"sourcePage": "", "sourceType": 0, "sourceRank": 0, "sourceIdenticalDescriptions": 0, "sourceTitleWords": 0, "sourceDescriptionWords": 0, "experiment": ""}, "experiment": {"ids": ""}}}</script> </devsite-analytics> <devsite-badger></devsite-badger> <script nonce="al4gPlRVyU0Kt7SphfGnEbwAjr02gW"> (function(d,e,v,s,i,t,E){d['GoogleDevelopersObject']=i; t=e.createElement(v);t.async=1;t.src=s;E=e.getElementsByTagName(v)[0]; E.parentNode.insertBefore(t,E);})(window, document, 'script', 'https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/js/app_loader.js', '[1,"en",null,"/js/devsite_app_module.js","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers","https://developers-dot-devsite-v2-prod.appspot.com",null,null,["/_pwa/developers/manifest.json","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/images/video-placeholder.svg","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/favicon-new.png","https://fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700&display=swap"],1,null,[1,6,8,12,14,17,21,25,50,52,63,70,75,76,80,87,91,92,93,97,98,100,101,102,103,104,105,107,108,109,110,112,113,116,117,118,120,122,124,125,126,127,129,130,131,132,133,134,135,136,138,140,141,147,148,149,151,152,156,157,158,159,161,163,164,168,169,170,179,180,182,183,186,191,193,196],"AIzaSyAP-jjEJBzmIyKR4F-3XITp8yM9T1gEEI8","AIzaSyB6xiKGDR5O3Ak2okS4rLkauxGUG7XP0hg","developers.google.com","AIzaSyAQk0fBONSGUqCNznf6Krs82Ap1-NV6J4o","AIzaSyCCxcqdrZ_7QMeLCRY20bh_SXdAYqy70KY",null,null,null,["EngEduTelemetry__enable_engedu_telemetry","Search__enable_suggestions_from_borg","Cloud__enable_cloud_shell_fte_user_flow","Cloud__enable_cloud_dlp_service","MiscFeatureFlags__enable_explain_this_code","BookNav__enable_tenant_cache_key","Search__enable_ai_search_summaries_restricted","Profiles__enable_developer_profiles_callout","Profiles__enable_page_saving","MiscFeatureFlags__emergency_css","MiscFeatureFlags__enable_firebase_utm","Concierge__enable_pushui","Concierge__enable_concierge","Search__enable_page_map","Cloud__enable_cloud_shell","CloudShell__cloud_code_overflow_menu","Cloud__enable_legacy_calculator_redirect","DevPro__enable_developer_subscriptions","Profiles__require_profile_eligibility_for_signin","CloudShell__cloud_shell_button","Search__enable_dynamic_content_confidential_banner","Cloud__enable_cloudx_ping","Analytics__enable_clearcut_logging","MiscFeatureFlags__developers_footer_dark_image","Profiles__enable_release_notes_notifications","Profiles__enable_profile_collections","Cloud__enable_free_trial_server_call","Profiles__enable_awarding_url","Cloud__enable_cloud_facet_chat","TpcFeatures__enable_required_headers","MiscFeatureFlags__enable_view_transitions","Profiles__enable_recognition_badges","Search__enable_ai_eligibility_checks","Cloud__enable_cloudx_experiment_ids","Search__enable_ai_search_summaries","Significatio__enable_by_tenant","MiscFeatureFlags__enable_variable_operator","MiscFeatureFlags__enable_project_variables","Experiments__reqs_query_experiments","DevPro__enable_cloud_innovators_plus","Cloud__enable_llm_concierge_chat","Profiles__enable_completecodelab_endpoint","Profiles__enable_complete_playlist_endpoint","TpcFeatures__enable_mirror_tenant_redirects","Concierge__enable_concierge_restricted","MiscFeatureFlags__developers_footer_image","Profiles__enable_public_developer_profiles","Profiles__enable_dashboard_curated_recommendations"],null,null,"AIzaSyBLEMok-5suZ67qRPzx0qUtbnLmyT_kCVE","https://developerscontentserving-pa.clients6.google.com","AIzaSyCM4QpTRSqP5qI4Dvjt4OAScIN8sOUlO-k","https://developerscontentsearch-pa.clients6.google.com",1,4,null,"https://developerprofiles-pa.clients6.google.com",[1,"developers","Google for Developers","developers.google.com",null,"developers-dot-devsite-v2-prod.appspot.com",null,null,[1,1,[1],null,null,null,null,null,null,null,null,[1],null,null,null,null,null,null,[1],[1,null,null,[1,20],"/recommendations/information"],null,null,null,[1,1,1],[1,1,null,1,1]],null,[null,null,null,null,null,null,"/images/lockup-new.svg","/images/touchicon-180-new.png",null,null,null,null,1,null,null,null,null,null,null,null,null,1,null,null,null,"/images/lockup-dark-theme-new.svg",[]],[],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[6,1,14,15,20,22,23,29,32,36],null,[[null,null,null,[3,7,10,2,39,17,4,32,24,11,12,13,34,15,25],null,null,[1,[["docType","Choose a content type",[["Tutorial",null,null,null,null,null,null,null,null,"Tutorial"],["Guide",null,null,null,null,null,null,null,null,"Guide"],["Sample",null,null,null,null,null,null,null,null,"Sample"]]],["product","Choose a product",[["Android",null,null,null,null,null,null,null,null,"Android"],["ARCore",null,null,null,null,null,null,null,null,"ARCore"],["ChromeOS",null,null,null,null,null,null,null,null,"ChromeOS"],["Firebase",null,null,null,null,null,null,null,null,"Firebase"],["Flutter",null,null,null,null,null,null,null,null,"Flutter"],["Assistant",null,null,null,null,null,null,null,null,"Google Assistant"],["GoogleCloud",null,null,null,null,null,null,null,null,"Google Cloud"],["GoogleMapsPlatform",null,null,null,null,null,null,null,null,"Google Maps Platform"],["GooglePay",null,null,null,null,null,null,null,null,"Google Pay & Google Wallet"],["GooglePlay",null,null,null,null,null,null,null,null,"Google Play"],["Tensorflow",null,null,null,null,null,null,null,null,"TensorFlow"]]],["category","Choose a topic",[["AiAndMachineLearning",null,null,null,null,null,null,null,null,"AI and Machine Learning"],["Data",null,null,null,null,null,null,null,null,"Data"],["Enterprise",null,null,null,null,null,null,null,null,"Enterprise"],["Gaming",null,null,null,null,null,null,null,null,"Gaming"],["Mobile",null,null,null,null,null,null,null,null,"Mobile"],["Web",null,null,null,null,null,null,null,null,"Web"]]]]]],[1,1],null,1],[[["UA-24532603-1"],["UA-22084204-5"],null,null,["UA-24532603-5"],null,null,[["G-272J68FCRF"],null,null,[["G-272J68FCRF",2]]],[["UA-24532603-1",2]],null,[["UA-24532603-5",2]],null,1],[[12,9],[6,5],[16,13],[11,8],[1,1],[13,10],[5,4],[15,12],[4,3],[14,11],[3,2]],[[2,2],[1,1]]],null,4,null,null,null,null,null,null,null,null,null,null,null,null,null,"developers.devsite.google"],null,"pk_live_5170syrHvgGVmSx9sBrnWtA5luvk9BwnVcvIi7HizpwauFG96WedXsuXh790rtij9AmGllqPtMLfhe2RSwD6Pn38V00uBCydV4m"]') </script> <devsite-a11y-announce></devsite-a11y-announce> </body> </html>