AddOns Response Service

AddOns Response Service

This service allows scripts to configure and build Google Workspace add-ons.

Classes

NameBrief description
AccessoryWidget A builder for Chat AccessoryWidget objects.
Action An action that Google Workspace add-ons that extend Google Workspace Studio can use to render a new card.
ActionResponse The actions that add-ons can use in cards or the host application.
ActionResponseBuilder A builder for ActionResponse objects.
AddOnsResponseService AddOnsResponseService provides the ability to create responses for Google Workspace add-ons.
AddonComposeUiActionResponse Represents an action on the addon compose ui.
AddonComposeUiActionResponseBuilder A builder for AddonComposeUiActionResponse objects.
AddonComposeUiActionType An enum value that specifies the type of an AddonComposeUiActionResponse .
Attachment Represents an attachment created by an add-on.
BasicDataType An enum that represents the basic generic data types.
CalendarEventActionResponse Represents a response that makes changes to the calendar event that the user is currently editing in reaction to an action taken in the UI, such as a button click.
CalendarEventActionResponseBuilder A builder for CalendarEventActionResponse objects.
ChatDataActionsResponseBuilder A builder for Chat DataAction objects.
ChatMessage A Google Chat message.
Color A Color object which represents a color in the RGBA color space.
ComposeActionResponse The response object that may be returned from a callback method for compose action in a Gmail add-on.
ComposeActionResponseBuilder A builder for ComposeActionResponse objects.
ComposedEmailType An enum value that specifies whether the composed email is a standalone or reply draft.
ContentType An enum value that specifies the content type of the content generated by a UpdateDraftActionResponse .
CreateMessageAction A builder for Chat CreateMessageAction objects.
DataActionsResponse Creates or updates a message in Google Chat.
DataType A DataType is used to set the type of a variable.
DriveItemsSelectedActionResponse Represents a response that makes changes to Drive while Drive items are selected and in reaction to an action taken in the UI, such as a button click.
DriveItemsSelectedActionResponseBuilder A builder for DriveItemsSelectedActionResponse objects.
DynamicResourceDefinition 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.
EditorFileScopeActionResponse Makes changes to an Editor, such as Google Docs, Sheets, or Slides in reaction to an action taken in the UI.
EditorFileScopeActionResponseBuilder A builder for EditorFileScopeActionResponse objects.
EndNavigation An enum that specifies the action during navigation.
ErrorActionability A Enum that represents the error actionability.
ErrorRetryability A Enum that represents the retry-ability of action invocation when having an error.
FontWeight An enum that represents the font weight of the styled text.
HostAppAction A HostAppAction is a type of Action that is handled by individual host apps.
Hyperlink A Hyperlink element used in TextFormatElement .
InsertSection A builder for InsertSection objects.
InsertWidget A builder for InsertWidget objects.
Link The link object from a third-party resource which gets converted it to a smart chip in the host application.
LinkPreview Card action that displays a link preview card and smart chip in the host app.
ListContainer Container for list items, where each list item can contain multiple TextFormatElement .
ListItem A list item, where each list item can contain multiple TextFormatElement .
ListType An enum that represents the type of the list.
ModifyCard A builder for ModifyCard objects that changes and updates an existing card's interface by passing the ModifyCard object to a Action .
Navigation A helper object that controls card navigation.
Notification Displays a notification when users submit and close a dialog.
OnClose An enum that specifies what to do when a URL opened through an OpenLink is closed.
OpenAs An enum that specifies how to open a URL.
OpenLink Represents an action to open a link with some options.
RemoveSection A builder for RemoveSection objects.
RemoveWidget A builder for RemoveWidget objects.
RenderAction Renders or updates a card by performing an Action in response to a user interaction.
RenderActionBuilder A builder for RenderAction objects.
ResourceData Represents a application specific resource data, a resource data contains a collection of key-value pairs of variable names and VariableData .
ResourceField A ResourceField is a basic building block of a DynamicResourceDefinition , each resource field corresponds to a output variable of the current step.
ResourceFieldsDefinitionRetrievedAction A ResourceFieldsDefinitionRetrievedAction is a type of ResourceFieldsDefinitionRetrievedAction that is used to retrieve the definition of a list of resource fields through the dynamicResourceDefinitionProvider function specified in the manifest.
ResourceRetrievedAction A ResourceRetrievedAction is used to retrieve custom resource content when needed, where the custom resource field is defined in the ResourceData.
ResourceType An application specific resource type, the unique identifier of the resource type should have a corresponding WorkflowResourceDefinition.
ReturnElementErrorAction A ReturnElementErrorAction indicates that an error occurred during element invocation.
ReturnOutputVariablesAction Contains output variables generated by the executed action in Google Workspace Studio.
SaveWorkflowAction This action indicates that the host app (Google Workspace Studio) should save the agent.
SendStatus An enum value that specifies the send status of an UpdateDraftActionResponse .
StyledText Text element with styles such as bold, italic and color.
TextFormatChip A clickable chip in the text format.
TextFormatElement A text format element, which can be a TextFormatChip , StyledText , Hyperlink , or ListContainer .
TextFormatIcon An icon that is displayed in a TextFormatChip .
TextStyle An enum that represents the style of the styled text.
TimeStamp Represents a timestamp object which is can be added to a VariableData .
UniversalActionResponse The response object that may be returned from a method that creates universal action.
UniversalActionResponseBuilder A builder for the UniversalActionResponse objects.
UpdateDraftActionResponse Represents an action that updates the email draft that the user is currently editing.
UpdateDraftActionResponseBuilder A builder for UpdateDraftActionResponse objects.
UpdateDraftBccRecipientsAction Updates the Bcc recipients of an email draft.
UpdateDraftBodyAction Updates the email draft body.
UpdateDraftBodyType An enum value that specifies the type of an UpdateDraftBodyAction .
UpdateDraftCcRecipientsAction Updates the Cc recipients of an email draft.
UpdateDraftSubjectAction Updates the subject line of an email draft.
UpdateDraftToRecipientsAction Updates the To recipients of an email draft.
UpdateInlinePreviewAction The Chat app previews a link in a message by adding or updating one or more cards.
UpdateMessageAction The Chat app updates text or cards in a message.
UpdateWidget A builder for UpdateWidget objects.
ValidationErrorSeverity An enum that represents the severity of the validation error.
ValueMetadata A valueMetadata contains information about the potential values of a variable.
VariableData Represents a variable data which can contain a collection of values in various types.
WorkflowAction A WorkflowAction is a type of HostAppAction that is used to perform a specific action in Google Workspace Studio.
WorkflowTextFormat A block of text with rich formatting options including styles, hyperlinks, and interactive elements defined in TextFormatElement .
WorkflowValidationErrorAction This action indicates that the host app (Google Workspace Studio) should display a validation error.

AccessoryWidget

Methods

MethodReturn typeBrief description
addWidget(widget) AccessoryWidget Sets the widget for this action.

Action

Methods

MethodReturn typeBrief description
addModifyCard(modifyCard) Action Adds a ModifyCard operation to the action.
addNavigation(navigation) Action Adds a card navigation to the action.

ActionResponse

Methods

MethodReturn typeBrief description
printJson() StringPrints the JSON representation of this object.

ActionResponseBuilder

Methods

MethodReturn typeBrief description
addModifyCard(modifyCard) ActionResponseBuilder Sets the modify card operation to the action.
build() ActionResponse Builds the current action response and validates it.
setLinkPreview(linkPreview) ActionResponseBuilder Sets the LinkPreview to the action.
setNavigation(navigation) ActionResponseBuilder Sets the response to a Navigation action.
setNotification(notification) ActionResponseBuilder Sets the notification to display when the action is activated.
setOpenLink(openLink) ActionResponseBuilder Sets the URL to navigate to when the action is activated.
setStateChanged(stateChanged) ActionResponseBuilder Sets a flag to indicate that this action changed the existing data state.

AddOnsResponseService

Properties

PropertyTypeDescription
AddonComposeUiActionTypeAddonComposeUiActionType The AddonComposeUiActionType enumeration.
ComposedEmailTypeComposedEmailType The ComposedEmailType enumeration.
ContentTypeContentType The ContentType enumeration.
EndNavigationEndNavigation The EndNavigation enumeration.
OnCloseOnClose The OnClose enumeration.
OpenAsOpenAs The OpenAs enumeration.
SendStatusSendStatus The SendStatus enumeration.
UpdateDraftBodyTypeUpdateDraftBodyType The UpdateDraftBodyType enumeration.

Methods

MethodReturn typeBrief description
newAccessoryWidget() AccessoryWidget Creates a new AccessoryWidget .
newAction() Action Creates a new Action .
newActionResponseBuilder() ActionResponseBuilder Creates a ActionResponseBuilder .
newAddonComposeUiActionResponseBuilder() AddonComposeUiActionResponseBuilder Creates a AddonComposeUiActionResponseBuilder .
newAttachment() Attachment Creates a Attachment .
newCalendarEventActionResponseBuilder() CalendarEventActionResponseBuilder Creates a CalendarEventActionResponseBuilder .
newChatDataActionBuilder() ChatDataActionsResponseBuilder Creates a ChatDataActionsResponseBuilder .
newChatMessage() ChatMessage Creates a ChatMessage .
newComposeActionResponseBuilder() ComposeActionResponseBuilder Creates a ComposeActionResponseBuilder .
newCreateMessageAction() CreateMessageAction Creates a CreateMessageAction .
newDriveItemsSelectedActionResponseBuilder() DriveItemsSelectedActionResponseBuilder Creates a DriveItemsSelectedActionResponseBuilder .
newEditorFileScopeActionResponseBuilder() EditorFileScopeActionResponseBuilder Creates a EditorFileScopeActionResponseBuilder .
newLinkPreview() LinkPreview Creates a LinkPreview .
newNavigation() Navigation Creates a Navigation .
newNotification() Notification Creates a Notification .
newOpenLink() OpenLink Creates a OpenLink .
newRenderActionBuilder() RenderActionBuilder Creates a new RenderActionBuilder .
newUniversalActionResponseBuilder() UniversalActionResponseBuilder Creates a UniversalActionResponseBuilder .
newUpdateDraftActionResponseBuilder() UpdateDraftActionResponseBuilder Creates a UpdateDraftActionResponseBuilder .
newUpdateDraftBccRecipientsAction() UpdateDraftBccRecipientsAction Creates a UpdateDraftBccRecipientsAction ;
newUpdateDraftBodyAction() UpdateDraftBodyAction Creates a UpdateDraftBodyAction .
newUpdateDraftCcRecipientsAction() UpdateDraftCcRecipientsAction Creates a UpdateDraftCcRecipientsAction .
newUpdateDraftSubjectAction() UpdateDraftSubjectAction Creates a UpdateDraftSubjectAction .
newUpdateDraftToRecipientsAction() UpdateDraftToRecipientsAction Creates a UpdateDraftToRecipientsAction .
newUpdateInlinePreviewAction() UpdateInlinePreviewAction Creates a UpdateInlinePreviewAction .
newUpdateMessageAction() UpdateMessageAction Creates a UpdateMessageAction .

AddonComposeUiActionResponse

Methods

MethodReturn typeBrief description
printJson() StringPrints the JSON representation of this object.

AddonComposeUiActionResponseBuilder

Methods

MethodReturn typeBrief description
build() AddonComposeUiActionResponse Builds the current addon compose ui action response and validates it.
setType(type) AddonComposeUiActionResponseBuilder Sets the enum field that determines the addon compose ui action.

AddonComposeUiActionType

Properties

PropertyTypeDescription
DISMISSEnumDefault.

Attachment

Methods

MethodReturn typeBrief description
setIconUrl(iconUrl) Attachment Sets the icon URL for the attachment.
setMimeType(mimeType) Attachment Sets the MIME type for the attachment.
setResourceUrl(resourceUrl) Attachment Sets the resource URL for the attachment.
setTitle(title) Attachment Sets the title for the attachment.

BasicDataType

Properties

PropertyTypeDescription
BASIC_TYPE_UNSPECIFIEDEnumDefault value.
STRINGEnumA string of characters.
INTEGEREnumAn integer value.
FLOATEnumA floating point number.
TIMESTAMPEnumA timestamp in ISO 8601 format.
BOOLEANEnumA boolean value.
EMAIL_ADDRESSEnumA string in the format of an email address.
GOOGLE_USEREnumA user of the Google services, in the format of “users/encoded_GAIA_ID”
FILEEnumA file type.
FORMATTED_TEXTEnumA text with rich formatting.

CalendarEventActionResponse

Methods

MethodReturn typeBrief description
printJson() StringPrints the JSON representation of this object.

CalendarEventActionResponseBuilder

Methods

MethodReturn typeBrief description
addAttachments(attachments) CalendarEventActionResponseBuilder Specifies that the response should add the attachments to the Calendar event when the associated UI action is taken.
addAttendees(emails) CalendarEventActionResponseBuilder Specifies that the response should add the indicated attendees to the Calendar event when the associated UI action is taken.
build() CalendarEventActionResponse Builds the current Calendar event action response and validates it.
setConferenceData(conferenceData) CalendarEventActionResponseBuilder Specifies that the response should set the indicated conference data to the Calendar event when the associated UI action is taken.

ChatDataActionsResponseBuilder

Methods

MethodReturn typeBrief description
build() DataActionsResponse Builds the current action response.
setCreateChatMessageAction(createMessageAction) ChatDataActionsResponseBuilder Sets the CreateMessageAction for this DataActionsResponse.
setUpdateChatMessageAction(updateMessageAction) ChatDataActionsResponseBuilder Sets the UpdateMessageAction for this DataActionsResponse.
setUpdateInlinePreviewAction(updateInlinePreviewAction) ChatDataActionsResponseBuilder Sets the UpdateInlinePreviewAction for this DataActionsResponse.

ChatMessage

Methods

MethodReturn typeBrief description
addAccessoryWidget(accessoryWidget) ChatMessage Sets the accessoryWidget for this action.
addCardWithId(cardWithId) ChatMessage Sets the card of the message.
setText(text) ChatMessage Sets the text of the message.

Color

Methods

MethodReturn typeBrief description
setAlpha(alpha) Color Sets the alpha component of the color.
setBlue(blue) Color Sets the blue component of the color.
setGreen(green) Color Sets the green component of the color.
setRed(red) Color Sets the red component of the color.

ComposeActionResponse

Methods

MethodReturn typeBrief description
printJson() StringPrints the JSON representation of this object.

ComposeActionResponseBuilder

Methods

MethodReturn typeBrief description
build() ComposeActionResponse Builds the current compose action response and validates it.
setGmailDraft(draft) ComposeActionResponseBuilder Sets the draft GmailMessage created using GmailMessage.createDraftReply(body) or similar functions.

ComposedEmailType

Properties

PropertyTypeDescription
REPLY_AS_DRAFTEnumA draft that is a reply to another message.
STANDALONE_DRAFTEnumA draft that is a standalone message.

ContentType

Properties

PropertyTypeDescription
TEXTEnumIndicates that the generated content is plain text.
MUTABLE_HTMLEnumIndicates that the generated content is formatted as HTML.
IMMUTABLE_HTMLEnumIndicates that the generated content is formatted as HTML, but this content cannot be edited after it is generated.

CreateMessageAction

Methods

MethodReturn typeBrief description
setMessage(message) CreateMessageAction Sets the message for this action.

DataActionsResponse

Methods

MethodReturn typeBrief description
printJson() StringPrints the JSON representation of this object.

DataType

Methods

MethodReturn typeBrief description
setBasicDataType(basicDataType) DataType Sets the data type to one of the supported BasicDataType s.
setResourceType(resourceType) DataType Sets the data type to a custom defined ResourceType .
setValueMetadata(valueMetadata) DataType Sets the ValueMetadata , which contains type-related information related to the variable.

DriveItemsSelectedActionResponse

Methods

MethodReturn typeBrief description
printJson() StringPrints the JSON representation of this object.

DriveItemsSelectedActionResponseBuilder

Methods

MethodReturn typeBrief description
build() DriveItemsSelectedActionResponse Builds the current Drive action response.
requestFileScope(itemId) DriveItemsSelectedActionResponseBuilder Specifies that the response requests file scope for the contextually-relevant item in Drive.

DynamicResourceDefinition

Methods

MethodReturn typeBrief description
addResourceField(resourceField) DynamicResourceDefinition Adds a resource field to the dynamic resource definition.
setResourceId(resourceId) DynamicResourceDefinition Sets the ID for the dynamic resource definition, this ID corresponds to the workflowResourceDefinitionId in the manifest.

EditorFileScopeActionResponse

Methods

MethodReturn typeBrief description
printJson() StringPrints the JSON representation of this object.

EditorFileScopeActionResponseBuilder

Methods

MethodReturn typeBrief description
build() EditorFileScopeActionResponse Builds the current Editor action response.
requestFileScopeForActiveDocument() EditorFileScopeActionResponseBuilder Requests the drive.file scope for the current active Editor document.

EndNavigation

Properties

PropertyTypeDescription
ACTION_UNSPECIFIEDEnumAction unspecified.
CLOSE_DIALOGEnumCloses a dialog.
CLOSE_DIALOG_AND_EXECUTEEnumCloses a dialog and refreshes the card that opened the dialog.

ErrorActionability

Properties

PropertyTypeDescription
ERROR_ACTIONABILITY_UNSPECIFIEDEnumUnspecified.
NOT_ACTIONABLEEnumThe error is not fixable by the user through the configuration card.
ACTIONABLEEnumThe error is fixable by the user through the configuration card.

ErrorRetryability

Properties

PropertyTypeDescription
RETRYABILITY_UNSPECIFIEDEnumUnspecified.
NOT_RETRYABLEEnumThe error is not retryable, the flow terminates after the first try.
RETRYABLEEnumThe error is retryable, Workflow is going to try to execute the Step for up to 5 times.

FontWeight

Properties

PropertyTypeDescription
FONT_WEIGHT_UNSPECIFIEDEnumStandard weight with normal thickness.
LIGHTEnumLighter weight with reduced thickness.
MEDIUMEnumIntermediate weight between light and bold.
BOLDEnumHeavier weight with increased thickness.

HostAppAction

Methods

MethodReturn typeBrief description
setWorkflowAction(workflowAction) HostAppAction Sets the host app action to Workflow action.

Methods

MethodReturn typeBrief description
setLink(link) Hyperlink Sets the destination URL of the hyperlink.
setText(text) Hyperlink Sets the text of the hyperlink.

InsertSection

Methods

MethodReturn typeBrief description
insertAtTop(onCardTop) InsertSection Sets the onCardTop flag, which indicates whether the new section should be inserted at the top of the card.
insertBelowSection(sectionId) InsertSection Sets the section ID, and the new section is inserted below it.
setSection(section) InsertSection Sets the card section to be inserted.

InsertWidget

Methods

MethodReturn typeBrief description
insertAboveWidget(widgetId) InsertWidget Sets the widget ID, and the new widget is inserted above the widget with the given ID.
insertBelowWidget(widgetId) InsertWidget Sets the widget ID, and the new widget is inserted below the widget with the given ID.
setWidget(widget) InsertWidget Sets the Widget to be inserted.

Methods

MethodReturn typeBrief description
setTitle(title) Link Sets the title of the link.
setUrl(url) Link Sets the URL of the link.

LinkPreview

Methods

MethodReturn typeBrief description
printJson() StringPrints the JSON representation of this object.
setLinkPreviewTitle(title) LinkPreview Sets the title that displays in the link preview above the preview card.
setPreviewCard(previewCard) LinkPreview Sets the card that displays information about a link from a third-party or non-Google service.
setTitle(title) LinkPreview Sets the title that displays in the smart chip for the link preview.

ListContainer

Methods

MethodReturn typeBrief description
addListItem(listItem) ListContainer Adds a list item to the list container.
setListNestLevel(listLevel) ListContainer Sets the level of the list, starts from 0 for the top level, and increases by 1 for each nested list.
setListType(listType) ListContainer Sets the type of the list to be ordered or unordered.

ListItem

Methods

MethodReturn typeBrief description
addTextFormatElement(textFormatElement) ListItem Adds a TextFormatElement to the list item.

ListType

Properties

PropertyTypeDescription
LIST_TYPE_UNSPECIFIEDEnumDefault value.
ORDEREDEnumOrdered list.
UNORDEREDEnumUnordered list.

ModifyCard

Methods

MethodReturn typeBrief description
setInsertSection(insertSection) ModifyCard Sets the InsertSection for this modify card object.
setInsertWidget(insertWidget) ModifyCard Sets the InsertWidget for this modify card object.
setRemoveSection(removeSection) ModifyCard Sets the RemoveSection for this modify card object.
setRemoveWidget(removeWidget) ModifyCard Sets the RemoveWidget for this modify card object.
setReplaceSection(replacementSection) ModifyCard Sets the replacement CardSection for this modify card object, the replacement section should have the same id as an existing card section.
setReplaceWidget(replacementWidget) ModifyCard Sets the replacement widget for this modify card object, the replacement widget should have the same id as an existing widget.
setUpdateWidget(updateWidget) ModifyCard Sets the UpdateWidget for this modify card object.

Methods

MethodReturn typeBrief description
popCard() Navigation
popToNamedCard(cardName) Navigation
popToRoot() Navigation
printJson() StringPrints the JSON representation of this object.
pushCard(card) Navigation Pushes the given card onto the stack.
setEndNavigation(endNavigation) Navigation Sets the end navigation action.
updateCard(card) Navigation Does an in-place replacement of the current card.

Notification

Methods

MethodReturn typeBrief description
setText(text) Notification Sets the text to show in the notification.

OnClose

Properties

PropertyTypeDescription
NOTHINGEnumDo nothing on close.
RELOADEnumReloads the add-on on when the window closes.

OpenAs

Properties

PropertyTypeDescription
FULL_SIZEEnumOpen in a full window or tab.
OVERLAYEnumOpen as an overlay such as a pop-up.

Methods

MethodReturn typeBrief description
setOnClose(onClose) OpenLink Sets the behavior of the URL action when the URL window or tab is closed.
setOpenAs(openAs) OpenLink Sets the behavior of URL when it is opened.
setUrl(url) OpenLink Sets the URL to be opened.

RemoveSection

Methods

MethodReturn typeBrief description
setSectionId(sectionId) RemoveSection Sets the section ID of the section to be removed.

RemoveWidget

Methods

MethodReturn typeBrief description
setWidgetId(widgetId) RemoveWidget Sets the widget ID of the widget to be removed.

RenderAction

Methods

MethodReturn typeBrief description
printJson() StringPrints the JSON representation of this object.

RenderActionBuilder

Methods

MethodReturn typeBrief description
build() RenderAction Builds the current render action and validates it.
setAction(action) RenderActionBuilder Sets the action that add-ons can use to update the UI to the render action.
setHostAppAction(hostAppAction) RenderActionBuilder Sets the HostAppAction handled by individual host apps to the render action.

ResourceData

Methods

MethodReturn typeBrief description
addVariableData(key, value) ResourceData Adds a VariableData keyed by its variable name, a value is overwritten if the key already exists.
setVariableDataMap(fields) ResourceData Sets the map of the variable data keyed by variable names.

ResourceField

Methods

MethodReturn typeBrief description
setDataType(dataType) ResourceField Sets the data type of the field, allows other steps to filter the variables by type at selection.
setDisplayText(displayText) ResourceField Sets the description of the field that is displayed to the end user during variable selection in subsequent steps.
setSelector(selector) ResourceField Sets a key for the provider function to provide the value to during the step's execution.

ResourceFieldsDefinitionRetrievedAction

Methods

MethodReturn typeBrief description
addDynamicResourceDefinition(dynamicResourceDefinition) ResourceFieldsDefinitionRetrievedAction Adds a DynamicResourceDefinition to the resource fields definition retrieved action.

ResourceRetrievedAction

Methods

MethodReturn typeBrief description
setResourceData(resourceData) ResourceRetrievedAction Sets the ResourceData to the resource retrieved action to provide values to the dynamic resource fields or custom resource fields.

ResourceType

Methods

MethodReturn typeBrief description
setWorkflowResourceDefinitionId(resourceType) ResourceType Sets the workflow resource definition id.

ReturnElementErrorAction

Methods

MethodReturn typeBrief description
setErrorActionability(errorActionability) ReturnElementErrorAction Sets the error actionability, an error should be actionable if it can be resolved by re-configuring the step.
setErrorLog(log) ReturnElementErrorAction Sets the error log to be displayed to the end user at Workflow's activity feed.
setErrorRetryability(errorRetryability) ReturnElementErrorAction Sets the error retry-ability, the flow terminates after the first try if an error is not retryable.

ReturnOutputVariablesAction

Methods

MethodReturn typeBrief description
addVariableData(key, value) ReturnOutputVariablesAction Adds a variable data keyed by its variable name, a value is overwritten if the key already exists.
setLog(log) ReturnOutputVariablesAction Sets the Log of the executed workflow action to the end user at Workflow's activity feed.
setVariableDataMap(variables) ReturnOutputVariablesAction Sets the map of the variable data keyed by variable name, a value is overwritten if the key already exists.

SaveWorkflowAction

SendStatus

Properties

PropertyTypeDescription
NOT_SENDEnumDefault.
CONTINUE_SENDEnumContinue sending the email after updating the draft.

StyledText

Methods

MethodReturn typeBrief description
addStyle(style) StyledText Sets the style of the styled text, can apply multiple styles to a single styled text.
setColor(color) StyledText Sets the color of the styled text.
setFontWeight(fontWeight) StyledText Sets the font weight of the styled text.
setText(text) StyledText Sets the main content of the styled text.

TextFormatChip

Methods

MethodReturn typeBrief description
setLabel(label) TextFormatChip Sets the text displayed in the chip.
setTextFormatIcon(icon) TextFormatChip Sets the icon displayed in the chip.
setUrl(url) TextFormatChip Sets the URL to navigate to when the chip is clicked.

TextFormatElement

Methods

MethodReturn typeBrief description
setHyperlink(hyperlink) TextFormatElement Sets the text format element as a Hyperlink .
setListContainer(listContainer) TextFormatElement Sets the text format element as a ListContainer .
setStyledText(styledText) TextFormatElement Sets the text format element as a StyledText .
setText(text) TextFormatElement Sets the text format element as a text string.
setTextFormatChip(chip) TextFormatElement Sets the text format element as a TextFormatChip .

TextFormatIcon

Methods

MethodReturn typeBrief description
setIconUrl(iconUrl) TextFormatIcon Sets the icon URL.
setMaterialIconName(materialIconName) TextFormatIcon Sets the material icon name defined in Google Material Icons.

TextStyle

Properties

PropertyTypeDescription
STYLE_UNSPECIFIEDEnumNo style applied.
ITALICEnumItalic style.
UNDERLINEEnumUnderline style.
STRIKETHROUGHEnumStrikethrough style.
LINE_BREAKEnumLine break.
UPPERCASEEnumUppercase style.
CODEEnumCode style.
CODE_BLOCKEnumCode block style.

TimeStamp

Methods

MethodReturn typeBrief description
setNanos(nanos) TimeStamp Sets the nanos of the timestamp, it represents the number of nanoseconds within the current second.
setSeconds(seconds) TimeStamp Sets the seconds of the timestamp, it represents the number of seconds since the Unix epoch(January 1, 1970, 00:00:00 UTC).

UniversalActionResponse

Methods

MethodReturn typeBrief description
printJson() StringPrints the JSON representation of this object.

UniversalActionResponseBuilder

Methods

MethodReturn typeBrief description
build() UniversalActionResponse Builds the current universal action response and validates it.
displayAddOnCards(cardObjects) UniversalActionResponseBuilder Displays the add-on with the specified cards.
setOpenLink(openLink) UniversalActionResponseBuilder Sets the URL to open when the universal action is selected.

UpdateDraftActionResponse

Methods

MethodReturn typeBrief description
printJson() StringPrints the JSON representation of this object.

UpdateDraftActionResponseBuilder

Methods

MethodReturn typeBrief description
build() UpdateDraftActionResponse Builds the current update draft action response and validates it.
setSendStatus(sendStatus) UpdateDraftActionResponseBuilder Sets the enum field that determines whether or not the email sends after the update action.
setUpdateDraftBccRecipientsAction(updateDraftBccRecipientsAction) UpdateDraftActionResponseBuilder Sets an action that updates the email Bcc recipients of a draft.
setUpdateDraftBodyAction(updateDraftBodyAction) UpdateDraftActionResponseBuilder Set an action that updates the email body of a draft.
setUpdateDraftCcRecipientsAction(updateDraftCcRecipientsAction) UpdateDraftActionResponseBuilder Sets an action that updates the Cc recipients of a draft.
setUpdateDraftSubjectAction(updateDraftSubjectAction) UpdateDraftActionResponseBuilder Sets an action that updates the subject line of a draft.
setUpdateDraftToRecipientsAction(updateDraftToRecipientsAction) UpdateDraftActionResponseBuilder Sets an action that updates the To recipients of a draft.

UpdateDraftBccRecipientsAction

Methods

MethodReturn typeBrief description
addUpdateBccRecipients(bccRecipientEmails) UpdateDraftBccRecipientsAction Updates the Bcc recipients of an email draft.

UpdateDraftBodyAction

Methods

MethodReturn typeBrief description
addUpdateContent(content, contentType) UpdateDraftBodyAction Adds the specified content to the draft body.
setUpdateType(updateType) UpdateDraftBodyAction Sets the UpdateDraftBodyType of this update action on the draft body.

UpdateDraftBodyType

Properties

PropertyTypeDescription
IN_PLACE_INSERTEnumDefault.
INSERT_AT_STARTEnumUpdate actions insert content at the start of message body.
INSERT_AT_ENDEnumUpdate actions insert content at the end of the message body.

UpdateDraftCcRecipientsAction

Methods

MethodReturn typeBrief description
addUpdateCcRecipients(ccRecipientEmails) UpdateDraftCcRecipientsAction Updates the Cc recipients of an email draft.

UpdateDraftSubjectAction

Methods

MethodReturn typeBrief description
addUpdateSubject(subject) UpdateDraftSubjectAction Updates the subject line of an email draft.

UpdateDraftToRecipientsAction

Methods

MethodReturn typeBrief description
addUpdateToRecipients(toRecipientEmails) UpdateDraftToRecipientsAction Updates the To recipients of an email draft.

UpdateInlinePreviewAction

Methods

MethodReturn typeBrief description
addCardWithId(cardWithId) UpdateInlinePreviewAction Adds the card for this action.
addExpiration(ttl) UpdateInlinePreviewAction Adds the expiration for this action.

UpdateMessageAction

Methods

MethodReturn typeBrief description
setMessage(message) UpdateMessageAction Sets the message for this action.

UpdateWidget

Methods

MethodReturn typeBrief description
addSuggestion(text, value, selected, startIconUri, bottomText) UpdateWidget Adds a new item that can be selected, for multi-select menus.

ValidationErrorSeverity

Properties

PropertyTypeDescription
SEVERITY_UNSPECIFIEDEnumUnspecified.
CRITICALEnumCritical, the error is critical and must be fixed before publish.
WARNINGEnumWarning, the error is non-critical and is not blocking publish.

ValueMetadata

Methods

MethodReturn typeBrief description
addCastableType(dataType) ValueMetadata Adds a optional allowed types that can be dynamically casted for a variable data to this value metadata.
addEnumValue(enumValue) ValueMetadata Adds an optional string value to the allowed enum values of a variable, this field can only be set if the DataType is set to String type.
setDefaultValue(defaultValue) ValueMetadata Sets the optional default value of the variable, example, if the variable type is boolean, defaultValue may be set to "true" or "false".

VariableData

Methods

MethodReturn typeBrief description
addBooleanValue(value) VariableData Adds a boolean value to the variable data.
addEmailAddress(emailAddress) VariableData Adds an email address to the variable data.
addFloatValue(value) VariableData Adds a float value to the variable data.
addGoogleUser(googleUser) VariableData Adds a google user to the variable data.
addIntegerValue(value) VariableData Adds an integer value to the variable data.
addResourceData(resourceData) VariableData Adds a ResourceData value to the variable data.
addResourceReference(resourceReference) VariableData Adds a resource reference ID to the variable data.
addStringValue(value) VariableData Adds a string value to the variable data.
addTimestampValue(value) VariableData Adds a TimeStamp value to the variable data.
addWorkflowTextFormat(workflowTextFormat) VariableData Adds a WorkflowTextFormat value to the variable data.

WorkflowAction

WorkflowTextFormat

Methods

MethodReturn typeBrief description
addTextFormatElement(textFormatElement) WorkflowTextFormat Adds a TextFormatElement to the workflow text format.

WorkflowValidationErrorAction

Methods

MethodReturn typeBrief description
setSeverity(severity) WorkflowValidationErrorAction Sets the severity of the validation error.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026年04月13日 UTC.