REST Resource: projects.chatAppConfig

Resource: ChatAppConfig

Represents the configuration of a Google Chat app built as a Google Workspace add-on.

JSON representation
{
  "name": string,
  "displayName": string,
  "description": string,
  "interactiveFeatureConfig": {
    object (InteractiveFeatureConfig)
  },
  "avatarUri": string,
  "state": enum (AppState),
  "errorLoggingEnabled": boolean,
  "markupSyntax": enum (MarkupSyntax)
}
Fields
name

string

Required. Identifier. Resource name of the Chat app configuration.

Format: projects/{project}/chatAppConfig, where {project} is the Google Cloud project number.

displayName

string

Required. The display name of the Chat app. Length should be between 3 and 25 characters.

description

string

Required. A short description of the Chat app. Should be between 1 and 40 characters.

interactiveFeatureConfig

object (InteractiveFeatureConfig)

Optional. The settings for interactive features of the app. If this is not provided, the app will be non-interactive, meaning that it can use the Chat API, but users can't interact with the app.

avatarUri

string

Optional. The URL for the app's avatar image. Must be an HTTPS URL that hosts a square (aspect ratio of 1:1) PNG image. Recommended minimum size: 256 by 256 pixels. A default app avatar will be used if not specified.

state

enum (AppState)

Optional. The state of the app. Defaults to ACTIVE if not specified.

errorLoggingEnabled

boolean

Optional. Whether to log errors to Cloud Logging. Defaults to false if not specified.

markupSyntax

enum (MarkupSyntax)

Optional. The default markup syntax for messages sent or read by this Chat app. Defaults to MARKUP_SYNTAX_MARKDOWN if not specified.

AppState

The current state of the Chat app.

Enums
APP_STATE_UNSPECIFIED Default value. Unspecified.
ACTIVE Maps to LIVE in the Chat API configuration page. The app is active, it can be found and used by people with visibility.
DISABLED The app is disabled, it can no longer be found by anyone, and nobody can talk to the app any more.

InteractiveFeatureConfig

Settings for the interactive features of the app.

JSON representation
{
  "connectionConfig": {
    object (ConnectionConfig)
  },
  "appCommands": [
    {
      object (AppCommand)
    }
  ],
  "urlPatterns": [
    {
      object (UrlPattern)
    }
  ],
  "allowlistedTestingPrincipals": [
    string
  ],
  "supportsMultiuserSpaces": boolean
}
Fields
connectionConfig

object (ConnectionConfig)

Required. How the app receives events from Google Chat.

appCommands[]

object (AppCommand)

Optional. Configuration for app commands.

urlPatterns[]

object (UrlPattern)

Optional. Configuration for link previews.

allowlistedTestingPrincipals[]

string

Optional. The email addresses of users and groups in your Google Workspace domain who can find and use the app.

supportsMultiuserSpaces

boolean

Optional. Whether the app can be added to 1:1 human DMs, group chats and spaces. Defaults to false if not specified.

ConnectionConfig

How the app receives events.

JSON representation
{

  "httpEndpointConfig": {
    object (HttpEndpointConfig)
  },
  "appsScriptEndpointConfig": {
    object (AppsScriptEndpointConfig)
  },
  "cloudPubSubEndpointConfig": {
    object (CloudPubSubEndpointConfig)
  },
  "dialogflowEndpointConfig": {
    object (DialogflowEndpointConfig)
  }
}
Fields
The type of connection. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
httpEndpointConfig

object (HttpEndpointConfig)

HTTP endpoint configuration.

appsScriptEndpointConfig

object (AppsScriptEndpointConfig)

Apps Script deployment configuration.

cloudPubSubEndpointConfig

object (CloudPubSubEndpointConfig)

Pub/Sub topic configuration.

dialogflowEndpointConfig

object (DialogflowEndpointConfig)

Dialogflow configuration.

End of mutually exclusive fields.

HttpEndpointConfig

HTTP endpoint configuration.

JSON representation
{

  "commonUrl": string,
  "perEventEndpointConfig": {
    object (HttpPerEventEndpointConfig)
  }
}
Fields
The HTTP endpoint URL configuration. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
commonUrl

string

Optional. The HTTPS URL to which Google Chat sends all interactive events.

perEventEndpointConfig

object (HttpPerEventEndpointConfig)

Optional. Separate HTTPS URLs to which Google Chat sends each type of interactive event.

End of mutually exclusive fields.

HttpPerEventEndpointConfig

HTTP endpoint configuration for specific event types.

JSON representation
{
  "appCommandEndpoint": string,
  "addedToSpaceEndpoint": string,
  "messageEndpoint": string,
  "removedFromSpaceEndpoint": string
}
Fields
appCommandEndpoint

string

Required. HTTPS URL endpoint for app command events.

addedToSpaceEndpoint

string

Required. HTTPS URL endpoint for added to space events.

messageEndpoint

string

Required. HTTPS URL endpoint for message events.

removedFromSpaceEndpoint

string

Required. HTTPS URL endpoint for removed from space events.

AppsScriptEndpointConfig

Apps Script endpoint configuration.

JSON representation
{
  "deploymentId": string,
  "perEventEndpointConfig": {
    object (AppsScriptPerEventEndpointConfig)
  }
}
Fields
deploymentId

string

Required. The Apps Script deployment ID.

perEventEndpointConfig

object (AppsScriptPerEventEndpointConfig)

Optional. The names of the Apps Script functions that Google Chat calls for each type of interactive event. If not specified, Chat calls the default function for each event type.

AppsScriptPerEventEndpointConfig

Apps Script endpoint configuration for specific event types.

JSON representation
{
  "appCommandEndpoint": string,
  "addedToSpaceEndpoint": string,
  "messageEndpoint": string,
  "removedFromSpaceEndpoint": string
}
Fields
appCommandEndpoint

string

Optional. Function name for app command events. If not specified, the default onAppCommand function name will be used.

addedToSpaceEndpoint

string

Optional. Function name for added to space events. If not specified, the default onAddedToSpace function name will be used.

messageEndpoint

string

Optional. Function name for message events. If not specified, the default onMessage function name will be used.

removedFromSpaceEndpoint

string

Optional. Function name for removed from space events. If not specified, the default onRemovedFromSpace function name will be used.

CloudPubSubEndpointConfig

Pub/Sub endpoint configuration.

JSON representation
{
  "topic": string
}
Fields
topic

string

Required. The Pub/Sub topic to which Google Chat publishes all interactive events. The topic must be in the same Google Cloud project as the app, and Chat must have permission to publish messages to the topic. For details, see Build a Google Chat app with Pub/Sub.

Format: projects/{project}/topics/{topic}

DialogflowEndpointConfig

Dialogflow endpoint configuration.

JSON representation
{
  "dialogflowEdition": enum (DialogflowEdition),
  "agent": string
}
Fields
dialogflowEdition

enum (DialogflowEdition)

Required. The Dialogflow edition.

agent

string

Optional. The Dialogflow CX agent or environment name. Required for Dialogflow CX. Do not set for Dialogflow ES.

Format: projects/{project}/locations/{location}/agents/{agent} or projects/{project}/locations/{location}/agents/{agent}/environments/{environment}.

DialogflowEdition

Dialogflow edition type.

Enums
DIALOGFLOW_EDITION_UNSPECIFIED Default value. Unspecified.
ES Dialogflow ES edition. To use this edition, a Dialogflow ES agent must exist in the same Google Cloud project as the app. Google Chat sends all interactive events to that agent.
CX Dialogflow CX edition. To use this edition, a Dialogflow CX agent must exist in the same Google Cloud project as the app and be specified in the agent field. Google Chat sends all interactive events to that agent.

AppCommand

Configuration for an app command.

JSON representation
{
  "commandType": enum (CommandType),
  "commandId": integer,
  "command": string,
  "displayName": string,
  "description": string,
  "dialogEnabled": boolean,
  "loadingNotificationMessage": string
}
Fields
commandType

enum (CommandType)

Required. The type of this command.

commandId

integer

Required. The ID of the command (1-1000). Must be unique within the app.

command

string

Optional. The name of the command. Required for SLASH_COMMAND, do not set for other command types. Must start with a "/", e.g., "/command".

displayName

string

Optional. The user-friendly display name of the command. Required for MESSAGE_ACTION and QUICK_COMMAND, do not set for SLASH_COMMAND.

description

string

Required. A short description of the command.

dialogEnabled

boolean

Optional. Whether this command should trigger a dialog. Defaults to false, if not specified.

loadingNotificationMessage

string

Optional. A notification to be sent to the user when they trigger the message action. Only supported for MESSAGE_ACTION commands.

CommandType

The type of the App Command.

Enums
COMMAND_TYPE_UNSPECIFIED Default value. Unspecified.
SLASH_COMMAND A command invoked by typing a '/' followed by the command name. It may accept additional arguments in the message text.
QUICK_COMMAND A quick command invoked from the message compose context menu. Quick commands do not accept additional arguments.
MESSAGE_ACTION A command invoked from a message context menu.

UrlPattern

Configuration for a link preview.

JSON representation
{
  "hostPattern": string,
  "pathPrefix": string
}
Fields
hostPattern

string

Required. The domain to match. Match a specific subdomain, like "subdomain.example.com", or an entire domain by including an asterisk (*) as a leading wildcard character. For example, "*.example.com" matches "https://subdomain.example.com" and "https://any.number.of.subdomains.example.com".

pathPrefix

string

Optional. Path prefix appended to the host pattern. If blank, matches all URLs in the host pattern. For example, when paired with the host pattern "subdomain.example.com", specify "path/" to match page URLs that begin with "https://subdomain.example.com/path/".

MarkupSyntax

The markup syntax used to format message text for this Chat app.

Enums
MARKUP_SYNTAX_UNSPECIFIED Default value. Unspecified. Existing Chat apps created before markup_syntax was introduced have this value and use MARKUP_SYNTAX_CHAT until explicitly updated.
MARKUP_SYNTAX_CHAT Uses Google Chat's markup syntax. See https://developers.google.com/workspace/chat/format-messages#format-texts for more information.
MARKUP_SYNTAX_MARKDOWN Uses Markdown syntax. This syntax is based on the CommonMark specification, with additional extensions. See https://developers.google.com/workspace/chat/format-messages#format-texts for more information.

Methods

get

Gets the Chat app configuration of a project.

patch

Updates the Chat app configuration of a project.