A DynamicResourceDefinition is a building block for a Resource
, it can contain one or more numbers of Resource
to dynamically define the number of output variables provided by a step in Google
Workspace Studio.
Only available for Google Workspace add-ons that extend Google Workspace Studio.
Sample usage:
let dynamicResourceDefinition = AddOnsResponseService . newDynamicResourceDefinition () . setResourceId ( "resource_definition_1" ) // The resource ID must match the one defined in the manifest. . addResourceField ( AddOnsResponseService . newResourceField () . setSelector ( "question_1" ) . setDisplayText ( "Question 1" ) );
Methods
| Method | Return type | Brief description |
|---|---|---|
Dynamic
|
Adds a resource field to the dynamic resource definition. | |
Dynamic
|
Sets the ID for the dynamic resource definition, this ID corresponds to the workflow
in the manifest. |
Detailed documentation
add
Resource
Field(resourceField)
Adds a resource field to the dynamic resource definition.
Parameters
| Name | Type | Description |
|---|---|---|
resource
|
Resource
|
The resource field to add. |
Return
Dynamic
— This object, for chaining.
set
Resource
Id(resourceId)
Sets the ID for the dynamic resource definition, this ID corresponds to the workflow
in the manifest.
Parameters
| Name | Type | Description |
|---|---|---|
resource
|
String
|
The unique identifier for the dynamic resource definition. |
Return
Dynamic
— This object, for chaining.

