function onGmailMessage(e) {
//build some card elements
var cardSection = CardService.newCardSection()
//add radio buttons
.addWidget(CardService.newSelectionInput()
.setFieldName('select1') //this is the "key"
.setTitle('Select your option below:')
.setType(CardService.SelectionInputType.RADIO_BUTTON)
.addItem('Option1', 'option1', false) //these are the "values"
.addItem('Option2', 'option2', false) //these are the "values"
.addItem('Option3', 'option3', false)) //these are the "values"
//add a button to take some action
.addWidget(CardService.newButtonSet()
.addButton(CardService.newTextButton()
.setText('Submit')
.setTextButtonStyle(CardService.TextButtonStyle.FILLED)
.setDisabled(false)
.setOnClickAction(CardService.newAction()
.setFunctionName("radioBtnTest")))); //the function that will be called when the button is pressed
//create the actual card
var card = CardService.newCardBuilder()
.setName("HomePage")
.addSection(cardSection)
.build();
return card;
}