Class Dialog

Dialog

For details, see Open interactive dialogs in the Google Chat documentation.

A builder for Dialog 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 
 (); 
 // Sets the card of the dialog. 
 const 
  
 dialog 
  
 = 
  
 CardService 
 . 
 newDialog 
 (). 
 setBody 
 ( 
 card 
 ); 

Methods

Method Return type Brief description
Dialog Sets the card of the Dialog .

Detailed documentation

set Body(card)

Sets the card of the Dialog .

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

Parameters

Name Type Description
card
Card The Card to use.

Return

Dialog — This object, for chaining.

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