Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
AzioneRisposta
L'oggetto risposta che può essere restituito da una funzione di callback (ad es. un gestore delle risposte ai moduli) per eseguire una o più azioni sul client. Alcune combinazioni di azioni non sono supportate.
// 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();
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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."]]],[]]