WorkflowDataSource

For a `https://developers.google.com/apps-script/reference/card-service/selection-input`,`https://developers.google.com/apps-script/reference/card-service/date-time-picker`\` or `https://developers.google.com/apps-script/reference/card-service/text-input` 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.

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

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/card-service/workflow-data-source#setIncludeVariables(Boolean)` | `https://developers.google.com/apps-script/reference/card-service/workflow-data-source#` | Whether to include variables from the previous step in the data source. |
| `https://developers.google.com/apps-script/reference/card-service/workflow-data-source#setType(WorkflowDataSourceType)` | `https://developers.google.com/apps-script/reference/card-service/workflow-data-source#` | Sets the type of the workflow data source. |
| `https://developers.google.com/apps-script/reference/card-service/workflow-data-source#setVariableButtonLabel(String)` | `https://developers.google.com/apps-script/reference/card-service/workflow-data-source#` | Sets the label of the variable picker button, which displays after the \`+\` sign in FULL_SIZE button size. |
| `https://developers.google.com/apps-script/reference/card-service/workflow-data-source#setVariableButtonSize(VariableButtonSize)` | `https://developers.google.com/apps-script/reference/card-service/workflow-data-source#` | 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

| Name | Type | Description |
|---|---|---|
| `includeVariables` | `Boolean` | Whether to include variables in the data source. |

#### Return


`https://developers.google.com/apps-script/reference/card-service/workflow-data-source#` --- This object, for chaining.

*** ** * ** ***

### `setType(type)`

Sets the type of the workflow data source.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `type` | `https://developers.google.com/apps-script/reference/card-service/workflow-data-source-type` | The type of the workflow data source. |

#### Return


`https://developers.google.com/apps-script/reference/card-service/workflow-data-source#` --- 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

| Name | Type | Description |
|---|---|---|
| `variableButtonLabel` | `String` | The label of the variable picker button. |

#### Return


`https://developers.google.com/apps-script/reference/card-service/workflow-data-source#` --- 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

| Name | Type | Description |
|---|---|---|
| `variableButtonSize` | `https://developers.google.com/apps-script/reference/card-service/variable-button-size` | The size of the variable picker button. |

#### Return


`https://developers.google.com/apps-script/reference/card-service/workflow-data-source#` --- This object, for chaining.