Google Chat

Overview

TL;DR: Create a Google Cloud project, enable Chat API, create a service account, run openclaw channels login google-chat --keyfile path/to/key.json, and invite the bot.

Applies to: Windows, macOS, Linux
Audience: Power users, developers, security-conscious, enterprise

1. Create Google Cloud Project

  1. Go to Google Cloud Console
  2. Click the project dropdown and select “New Project”
  3. Enter a project name (e.g., “OpenClaw Bot”)
  4. Click “Create”

2. Enable Chat API

  1. In the sidebar, go to “APIs & Services” > “Library”
  2. Search for “Google Chat API”
  3. Click “Enable”

3. Create Service Account

  1. Go to “IAM & Admin” > “Service Accounts”
  2. Click “Create Service Account”
  3. Enter a name (e.g., “openclaw-bot”)
  4. Click “Create and Continue”
  5. Grant the role “Chat API App” (or “Project > Editor” for testing)
  6. Click “Done”
  7. Click the service account email > “Keys” > “Add Key” > “Create new key”
  8. Choose JSON and click “Create”
  9. Save the JSON key file securely

4. Login Command

Run the Google Chat login command:

openclaw channels login google-chat --keyfile path/to/key.json

Replace path/to/key.json with the path to your downloaded key file.

5. Add Bot to Spaces

  1. In Google Chat, open a space or DM
  2. Type @ and search for the service account email
  3. Select the bot to add it to the space
FAQ:
Q: Do I need a Google Workspace account?
A: No. A regular Google account with a Cloud project works.
Q: What if the bot doesn’t respond?
A: Ensure the Chat API is enabled and the service account has permissions.