Class ActionResponse

ActionResponse

The response object that may be returned from a callback function (e.g., a form response handler) to perform one or more actions on the client. Some combinations of actions are not supported.


 // An action that opens a link
 var actionResponse = CardService.newActionResponseBuilder()
     .setOpenLink(CardService.newOpenLink()
         .setUrl("https://www.google.com"))
     .build();

 // An action that shows a notification.
 var actionResponse = CardService.newActionResponseBuilder()
     .setNotification(CardService.newNotification()
         .setType(CardService.Notification.INFO)
         .setText("Some info to display to user"))
     .build();

 // An action that shows an additional card.
 var cardBuilder = CardService.newCardBuilder();
 // Build card ...
 var actionResponse = CardService.newActionResponseBuilder()
     .setNavigation(CardService.newNavigation()
         .pushCard(cardBuilder.build()))
     .build();
 

Methods

MethodReturn typeBrief description
printJson()StringPrints the JSON representation of this object.

Detailed documentation

printJson()

Prints the JSON representation of this object. This is for debugging only.

Return

String

Send feedback about...

Apps Script
Apps Script