Channels

Google Chat

The Google Chat channel connects Open Astra agents to a Google Chat space or direct messages using a Google Chat app backed by a service account. Responses are delivered as Cards V2 for structured output or plain text for conversational replies.

Prerequisites

  • A Google Cloud project with the Chat API enabled
  • A Google Chat app configured as a bot
  • A service account with the chat.bot scope
  • A publicly accessible HTTPS endpoint for the incoming webhook

Setup

  1. In the Google Cloud Console, enable the Google Chat API
  2. Go to Google Chat API > Configuration and create a new Chat app
  3. Set the bot endpoint URL to: https://your-domain/channels/google-chat
  4. Create a service account and download the JSON key file
  5. Add the service account key to your environment as a JSON string:
bash
# Inline the JSON key as a single-line string
GOOGLE_CHAT_SERVICE_ACCOUNT_KEY='{"type":"service_account","project_id":"..."}'

Configuration in astra.yml

yaml
channels:
  googleChat:
    enabled: true
    defaultAgent: assistant-agent
    allowedSpaceIds: []         # Empty means all spaces allowed
    useCardsV2: true            # Use Cards V2 for rich formatting

Features

  • Cards V2 — structured responses (tables, sections, buttons) are rendered as Google Chat Cards V2
  • Slash commands — all shared commands are registered as Google Chat slash commands
  • Threaded replies — agent responses are sent as thread replies in spaces
  • Mentions — the bot responds when mentioned in a space message
  • Direct messages — users can open a direct message with the bot for private conversations
💡Google Chat requires domain verification for production deployments. During development, you can publish the app only to your Google Workspace organization without verification.