ReturnOutputVariablesAction

Contains output variables generated by the executed action in Google Workspace Studio.

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

Sample usage:

```javascript
const variableDataMap = {
  "result": AddOnsResponseService.newVariableData()
    .addIntegerValue(100)
};
const workflowAction = AddOnsResponseService.newReturnOutputVariablesAction()
  .setVariableDataMap(variableDataMap);

const hostAppAction = AddOnsResponseService.newHostAppAction()
  .setWorkflowAction(workflowAction);

 const renderAction = AddOnsResponseService.newRenderActionBuilder()
  .setHostAppAction(hostAppAction)
  .build();

return renderAction;
```

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/add-ons-response-service/return-output-variables-action#addVariableData(String,VariableData)` | `https://developers.google.com/apps-script/reference/add-ons-response-service/return-output-variables-action#` | Adds a variable data keyed by its variable name, a value is overwritten if the key already exists. |
| `https://developers.google.com/apps-script/reference/add-ons-response-service/return-output-variables-action#setLog(WorkflowTextFormat)` | `https://developers.google.com/apps-script/reference/add-ons-response-service/return-output-variables-action#` | Sets the Log of the executed workflow action to the end user at Workflow's activity feed. |
| `https://developers.google.com/apps-script/reference/add-ons-response-service/return-output-variables-action#setVariableDataMap(Object)` | `https://developers.google.com/apps-script/reference/add-ons-response-service/return-output-variables-action#` | Sets the map of the variable data keyed by variable name, a value is overwritten if the key already exists. |

## Detailed documentation

### `addVariableData(key, value)`

Adds a variable data keyed by its variable name, a value is overwritten if the key already
exists.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `key` | `String` | The variable name of string type to retrieve the output variable data. |
| `value` | `https://developers.google.com/apps-script/reference/add-ons-response-service/variable-data` | The data of the variable. |

#### Return


`https://developers.google.com/apps-script/reference/add-ons-response-service/return-output-variables-action#` --- This return output variables action, for chaining.

*** ** * ** ***

### `setLog(log)`

Sets the Log of the executed workflow action to the end user at Workflow's activity feed.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `log` | `https://developers.google.com/apps-script/reference/add-ons-response-service/workflow-text-format` | The `https://developers.google.com/apps-script/reference/add-ons-response-service/workflow-text-format` log of the executed workflow action. |

#### Return


`https://developers.google.com/apps-script/reference/add-ons-response-service/return-output-variables-action#` --- This return output variables action, for chaining.

*** ** * ** ***

### `setVariableDataMap(variables)`

Sets the map of the variable data keyed by variable name, a value is overwritten if the key
already exists.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `variables` | `Object` | A collection of key-value pairs of string and variable data. |

#### Return


`https://developers.google.com/apps-script/reference/add-ons-response-service/return-output-variables-action#` --- This return output variables action, for chaining.