Class WorkflowDataSource

WorkflowDataSource

For a SelectionInput,DateTimePicker` or TextInput widget, a data source from a Google Workspace flow. The data source populates available options for a widget.

Only available through the Gemini Alpha program for Google Workspace add-ons that extend Google Workspace Flows.

const workflowDataSource = CardService.newWorkflowDataSource().setIncludeVariables(true)
.setType(CardService.WorkflowDataSourceType.USER);

Methods

MethodReturn typeBrief description
setIncludeVariables(includeVariables)WorkflowDataSourceWhether to include variables from the previous step in the data source.
setType(type)WorkflowDataSourceSets the type of the workflow data source.
setVariableButtonLabel(variableButtonLabel)WorkflowDataSourceSets the label of the variable picker button, which will be displayed after the `+` sign in FULL_SIZE button size.
setVariableButtonSize(variableButtonSize)WorkflowDataSourceSets the size of the variable picker button, Workflow will automatically using COMPACT in side panel and FULL_SIZE in other cases if UNSPECIFIED is selected.

Detailed documentation

setIncludeVariables(includeVariables)

Whether to include variables from the previous step in the data source.

Parameters

NameTypeDescription
includeVariablesBooleanWhether to include variables in the data source.

Return

WorkflowDataSource — This object, for chaining.


setType(type)

Sets the type of the workflow data source.

Parameters

NameTypeDescription
typeWorkflowDataSourceTypeThe type of the workflow data source.

Return

WorkflowDataSource — This object, for chaining.


setVariableButtonLabel(variableButtonLabel)

Sets the label of the variable picker button, which will be displayed after the `+` sign in FULL_SIZE button size.

Parameters

NameTypeDescription
variableButtonLabelStringThe label of the variable picker button.

Return

WorkflowDataSource — This object, for chaining.


setVariableButtonSize(variableButtonSize)

Sets the size of the variable picker button, Workflow will automatically using COMPACT in side panel and FULL_SIZE in other cases if UNSPECIFIED is selected. A COMPACT button will only display the `+` sign.

Parameters

NameTypeDescription
variableButtonSizeVariableButtonSizeThe size of the variable picker button.

Return

WorkflowDataSource — This object, for chaining.