Class WorkflowDataSource

WorkflowDataSource

For a SelectionInput ,DateTimePicker ` or TextInput widget, a data source used in Google Workspace Studio. The data source populates available options for a widget.

Only available for Google Workspace add-ons that extend Google Workspace Studio.

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

Methods

MethodReturn typeBrief description
setIncludeVariables(includeVariables) WorkflowDataSource Whether to include variables from the previous step in the data source.
setType(type) WorkflowDataSource Sets the type of the workflow data source.
setVariableButtonLabel(variableButtonLabel) WorkflowDataSource Sets the label of the variable picker button, which displays after the `+` sign in FULL_SIZE button size.
setVariableButtonSize(variableButtonSize) WorkflowDataSource Sets the size of the variable picker button, Workflow automatically uses 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
typeWorkflowDataSourceType The type of the workflow data source.

Return

WorkflowDataSource — This object, for chaining.


setVariableButtonLabel(variableButtonLabel)

Sets the label of the variable picker button, which displays 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 automatically uses COMPACT in side panel and FULL_SIZE in other cases if UNSPECIFIED is selected. A COMPACT button only displays the `+` sign.

Parameters

NameTypeDescription
variableButtonSizeVariableButtonSize The size of the variable picker button.

Return

WorkflowDataSource — This object, for chaining.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年12月03日 UTC.