A DynamicResourceDefinition is a building block for a ResourceFieldsDefinitionRetrievedAction
, it can contain one or more numbers of ResourceField
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
addResourceField(resourceField)
Adds a resource field to the dynamic resource definition.
Parameters
| Name | Type | Description |
|---|---|---|
resource
|
Resource
|
The resource field to add. |
Return
DynamicResourceDefinition
— This object, for chaining.
setResourceId(resourceId)
Sets the ID for the dynamic resource definition, this ID corresponds to the workflowResourceDefinitionId
in the manifest.
Parameters
| Name | Type | Description |
|---|---|---|
resource
|
String
|
The unique identifier for the dynamic resource definition. |
Return
DynamicResourceDefinition
— This object, for chaining.

