Class DialogAction

Dialog Action

A builder for Dialog Action objects.

Only available for Google Chat apps. Not available for Google Workspace add-ons.

 const 
  
 card 
  
 = 
  
 CardService 
 . 
 newCardBuilder 
 () 
  
 . 
 setHeader 
 ( 
 CardService 
 . 
 newCardHeader 
 (). 
 setTitle 
 ( 
 'Card title' 
 )) 
  
 . 
 build 
 (); 
 const 
  
 dialog 
  
 = 
  
 CardService 
 . 
 newDialog 
 (). 
 setBody 
 ( 
 card 
 ); 
 const 
  
 dialogAction 
  
 = 
  
 CardService 
 . 
 newDialogAction 
 (). 
 setDialog 
 ( 
 dialog 
 ); 

Methods

Method Return type Brief description
Dialog Action Sets the action status of Dialog Action .
Dialog Action Sets the dialog of the Dialog Action .

Detailed documentation

set Action Status(actionStatus)

Sets the action status of Dialog Action .

 const 
  
 actionStatus 
  
 = 
  
 CardService 
 . 
 newActionStatus 
 (). 
 setStatusCode 
 ( 
  
 CardService 
 . 
 Status 
 . 
 OK 
 , 
 ); 
 const 
  
 dialogAction 
  
 = 
  
 CardService 
 . 
 newDialogAction 
 (). 
 setActionStatus 
 ( 
 actionStatus 
 ); 

Parameters

Name Type Description
action Status
Action Status The Action Status to use.

Return

Dialog Action — This object, for chaining.


set Dialog(dialog)

Sets the dialog of the Dialog Action .

 const 
  
 card 
  
 = 
  
 CardService 
 . 
 newCardBuilder 
 () 
  
 . 
 setHeader 
 ( 
 CardService 
 . 
 newCardHeader 
 (). 
 setTitle 
 ( 
 'card title' 
 )) 
  
 . 
 build 
 (); 
 // Sets the card of the dialog. 
 const 
  
 dialog 
  
 = 
  
 CardService 
 . 
 newDialog 
 (). 
 setBody 
 ( 
 card 
 ); 
 const 
  
 dialogAction 
  
 = 
  
 CardService 
 . 
 newDialogAction 
 (). 
 setDialog 
 ( 
 dialog 
 ); 

Parameters

Name Type Description
dialog
Dialog The Dialog to use.

Return

Dialog Action — This object, for chaining.

Create a Mobile Website
View Site in Mobile | Classic
Share by: