Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
AcciónRespuesta
Es el objeto de respuesta que se puede mostrar desde una función de devolución de llamada (p.ej., un controlador de respuesta de formulario)
para realizar una o más acciones en el cliente. No se admiten algunas combinaciones de acciones.
// An action that opens a link
const actionResponse =
CardService.newActionResponseBuilder()
.setOpenLink(CardService.newOpenLink().setUrl('https://www.google.com'))
.build();
// An action that shows a notification.
const notificationActionResponse = CardService.newActionResponseBuilder()
.setNotification(
CardService.newNotification().setText(
'Some info to display to user'),
)
.build();
// An action that shows an additional card. It also sets a flag to indicate that
// the original state data has changed.
const cardBuilder = CardService.newCardBuilder();
// Build card ...
const navigationActionResponse = CardService.newActionResponseBuilder()
.setNavigation(CardService.newNavigation().pushCard(
cardBuilder.build()))
.setStateChanged(true)
.build();
[[["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: 2024-12-02 (UTC)"],[[["`ActionResponse` enables callback functions to trigger actions like opening links, displaying notifications, and navigating between cards within Google Workspace add-ons."],["Developers can use `ActionResponseBuilder` methods to define these actions and control client-side behavior based on user interactions."],["The `printJson()` method helps with debugging by providing the JSON representation of the `ActionResponse` object."]]],[]]