I am developing a Gmail Workspace add-on and I want to display a dropdown with items provided by an external web service. Google Apps Script documentation for SelectionInput
states that you can provide selection items from external data source and even provides a code sample:
.setExternalDataSource(CardService.newAction().setFunctionName("getContacts"))
However, the getContacts()
function is not shown in the sample and I have not been able to find any information what value should the function return. I have tried to return an array of objects with fields like text
or value
, but nothing seems to work. Does anyone know how the return value should look like?
Thanks