Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
CardWithId
Es un compilador para objetos CardWithId. Esta clase es un identificador único para una tarjeta en un
mensaje cuando se envían varias tarjetas.
Solo está disponible para las apps de Google Chat. No está disponible para complementos de Google Workspace.
constcardSection=CardService.newCardSection();cardSection.addWidget(CardService.newTextParagraph().setText('This is a text paragraph widget.'),);constcard=CardService.newCardBuilder().setHeader(CardService.newCardHeader().setTitle('Card title')).addSection(cardSection).build();constcardWithId=CardService.newCardWithId().setCardId('card_id').setCard(card);
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-01-30 (UTC)"],[[["`CardWithId` is a builder for creating cards with unique identifiers, specifically for use in Google Chat apps."],["It allows developers to set a card's content using `setCard()` and assign a unique ID using `setCardId()`."],["This functionality is crucial when sending multiple cards within a single message, enabling individual card identification and management."],["This feature is not available for Google Workspace Add-ons."]]],["`CardWithId` objects are unique identifiers for cards in messages, specifically for Google Chat apps. They are built using `CardService.newCardWithId()`. The core actions involve using `setCard(card)` to assign a `Card` object to the `CardWithId`, and `setCardId(id)` to assign a unique string identifier to the `CardWithId`. Both `setCard` and `setCardId` are chainable methods and are only available for Google Chat apps.\n"]]