FruxonDocs

Google Chat

Google Chat integration for spaces, messages, memberships, and reactions

The Google Chat integration lets your agents post into spaces and direct messages, read space and membership information, manage reactions, and receive Google Chat events through Agent Network.

Prerequisites

You need:

  • A Google Cloud project with the Chat API enabled — Enable it from the Google Chat API library page, then configure your Chat app under Chat API → Configuration (name, avatar, description).
  • A Google account to connect — Fruxon authenticates as this user, so messages the agent sends are attributed to that account. Use a dedicated Workspace service user if you don't want messages appearing under a person's name.

Setup

  1. Open Integrations from the sidebar
  2. Select Google Chat from the catalog
  3. Click Add Integration Config
  4. Give the config a display name (e.g., "Google Chat - Company Workspace")
  5. Click Connect to start the Google OAuth flow, and grant the scopes the agent needs
  6. Save the config

Scopes

Google splits the Chat API across several scopes. The recommended set covers the common case — find a space, see who's in it, and post:

ScopeGrants
View spacesList spaces and direct messages, and read their names and metadata.
Send messagesPost messages and thread replies. Write-only — no access to messages the agent didn't send.
View space membersList the people and apps that belong to a space.
Manage spacesCreate spaces and change names and descriptions.
Manage space membersAdd and remove members.
Manage reactionsAdd and list emoji reactions.
Read message historyRead the text of existing messages. Google restricted scope.
Read and manage messagesRead, send, edit, and delete messages. Google restricted scope.

Restricted scopes require a third-party security assessment and an annual audit, so they are off by default. Reading message history and editing or deleting messages need them; sending does not.

Receiving Messages

To let agents receive Google Chat messages:

  1. In the Fruxon deployment dialog, generate the config webhook URL
  2. In the Google Cloud console, open Chat API → Configuration
  3. Under Interactive features, enable Receive 1:1 messages and Join spaces and group conversations
  4. Set Connection settings to HTTP endpoint URL and paste the Fruxon webhook URL
  5. Set the Authentication Audience — either your Cloud project number or the endpoint URL
  6. Copy that same value into the config's audience parameter in Fruxon
  7. Add the Chat app to the spaces it should watch

Fruxon verifies the bearer token Google signs each event with against the audience value. Inbound events are rejected until the two match, so the parameter is required for receiving — leave it blank for outbound-only use.

A Chat app accepts exactly one HTTP endpoint URL, so Fruxon uses one webhook per Google Chat integration config and dispatches to triggers and participants from there.

Google delivers messages to a Chat app when it is @-mentioned in a space, and for every message in a direct message with the app. Ambient space chatter never reaches Fruxon.

Using in Your Agent

  1. Open your agent in Agent Studio and select an Agent Step
  2. Under Attached Integration Configurations, click Attach configuration and choose your config
  3. Attach Google Chat tools from the tools panel
  4. Tools are referenced as google_chat.send_message, google_chat.list_spaces, etc.

Channels

Google Chat exposes one channel descriptor for Agent Network participants:

ChannelDescription
spaceA Google Chat space — a named room, a group conversation, or a direct message. All three use the same spaces/... resource name.

Use the full resource name (spaces/AAQAtjsc9v4), not the display name. Copy it from the space's URL — the segment after /room/ or /dm/ — or read it off list_spaces.

Triggers

TriggerDescription
google_chat.message.receivedFires when the Chat app receives a message — an @-mention in a space, or any message in a direct message with the app.
google_chat.space.addedFires when the Chat app is added to a space or a direct message is opened with it.

Both triggers require a Google Chat integration config with the audience parameter set and the HTTP endpoint wired to Fruxon. Their payloads include the standard inbound-message fields (payload.text, payload.from, payload.from_name, payload.conversation_name, payload.conversation_address, payload.session_id, payload.event_type) plus Chat-specific fields: payload.message_attributes.space_name, payload.message_attributes.thread_name, payload.message_attributes.message_name, and payload.message_attributes.user_id.

Available Tools

Spaces

ToolDescriptionAction Type
list_spacesList the spaces and direct messages the connected account belongs toReadOnly
get_spaceFetch one space by resource nameReadOnly
find_direct_messageFind the existing direct message space with one other userReadOnly
create_spaceCreate a named spaceReversible

Messages

ToolDescriptionAction Type
send_messagePost a message to a space or direct messageIrreversible
reply_to_threadPost a reply inside an existing threadIrreversible
list_messagesList messages in a space (needs a restricted read scope)ReadOnly
get_messageFetch one message by resource name (needs a restricted read scope)ReadOnly
update_messageReplace the text of a message the connected account sentReversible
delete_messageDelete a message the connected account sentIrreversible

Memberships and reactions

ToolDescriptionAction Type
list_membersList the people and apps in a spaceReadOnly
add_memberAdd a person to a spaceReversible
add_reactionAdd an emoji reaction to a messageReversible
list_reactionsList the reactions on a message and who left themReadOnly

Limitations

  • Replies are attributed to the connected user, not to the Chat app, because Fruxon authenticates with that user's OAuth credential.
  • File attachments on inbound messages are described, not downloaded. Fetching the bytes needs the restricted read-message scope, so the agent sees the file name and content type in the message text rather than the file itself.
  • Card interactions (CARD_CLICKED, WIDGET_UPDATED) and REMOVED_FROM_SPACE events are not handled.

On this page