Class ReturnOutputVariablesAction

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:

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

MethodReturn typeBrief description
addVariableData(key, value)ReturnOutputVariablesActionAdds a variable data keyed by its variable name, a value is overwritten if the key already exists.
setLog(log)ReturnOutputVariablesActionSets the Log of the executed workflow action to the end user at Workflow's activity feed.
setVariableDataMap(variables)ReturnOutputVariablesActionSets 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

NameTypeDescription
keyStringThe variable name of string type to retrieve the output variable data.
valueVariableDataThe data of the variable.

Return

ReturnOutputVariablesAction — 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

NameTypeDescription
logWorkflowTextFormatThe WorkflowTextFormat log of the executed workflow action.

Return

ReturnOutputVariablesAction — 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

NameTypeDescription
variablesObjectA collection of key-value pairs of string and variable data.

Return

ReturnOutputVariablesAction — This return output variables action, for chaining.