AI-generated Key Takeaways
-
Suggestions provide autocomplete suggestions for TextInput widgets in Google Workspace add-ons and Google Chat apps.
-
You can add individual text suggestions using
addSuggestion(suggestion)
or a list of text suggestions usingaddSuggestions(suggestions)
.
Autocomplete suggestions to supplement a Text
widget.
Available for Google Workspace add-ons and Google Chat apps.
const textInput = CardService.newTextInput().setSuggestions( CardService.newSuggestions() .addSuggestion('First suggestion') .addSuggestion('Second suggestion'), );
Methods
Method | Return type | Brief description |
---|---|---|
add | Suggestions | Add a text suggestion. |
add | Suggestions | Add a list of text suggestions. |
Detailed documentation
addSuggestion(suggestion)
Add a text suggestion.
Parameters
Name | Type | Description |
---|---|---|
suggestion | String | The suggestion text. |
Return
Suggestions
— This object, for chaining.
addSuggestions(suggestions)
Add a list of text suggestions.
Parameters
Name | Type | Description |
---|---|---|
suggestions | Object[] | An array of string suggestions. |
Return
Suggestions
— This object, for chaining.