メインコンテンツまでスキップ

Google Chat (Chat API)

Status: ready for DMs + spaces via Google Chat API webhooks (HTTP only).

ClawCentral connects to Google Chat as an HTTP app. Google Chat POSTs events to ClawCentral's managed platform; ClawCentral verifies the Google OIDC JWT on every inbound request automatically. No local server or tunnel is needed.

Webhook URL

https://<your-tenant>.clawcentral.io/webhooks/google-chat

Replace <your-tenant> with your ClawCentral tenant slug.

Required credentials

Set these in Admin UI → Settings → Tenant Settings → Secrets:

SecretDescription
GOOGLE_CHAT_PROJECT_NUMBERYour Google Cloud project number
GOOGLE_CHAT_SERVICE_ACCOUNT_KEYFull JSON content of the service account key file

Setup

Step 1: Create a Google Cloud project and enable the Chat API

  1. Go to Google Chat API in Google Cloud Console
  2. Enable the API if it is not already enabled.

Step 2: Create a Service Account

  1. Click Create Credentials > Service Account
  2. Name it (e.g., clawcentral-chat)
  3. Leave permissions blank → ContinueDone

Step 3: Create and download the JSON Key

  1. In the list of service accounts, click on the one you just created
  2. Go to the Keys tab
  3. Click Add Key > Create new key
  4. Select JSON and press Create — a .json file downloads automatically

Step 4: Configure the Google Chat App

  1. Go to Google Cloud Console Chat Configuration
  2. Fill in the Application info:
    • App name: e.g., ClawCentral
    • Avatar URL: your logo URL
    • Description: e.g., Personal AI Assistant
  3. Enable Interactive features
  4. Under Functionality, check Join spaces and group conversations
  5. Under Connection settings, select HTTP endpoint URL
  6. Under Triggers, select Use a common HTTP endpoint URL for all triggers and set it to:
    https://<your-tenant>.clawcentral.io/webhooks/google-chat
  7. Under Visibility, check Make this Chat app available to specific people and groups in <Your Domain>
  8. Enter your email address in the text box
  9. Click Save

Step 5: Enable the app status

  1. After saving, refresh the page
  2. Find the App status section
  3. Change the status to Live - available to users
  4. Click Save again

Step 6: Note your Google Cloud project number

  1. In Google Cloud Console → HomeDashboard
  2. Copy the Project number (not the project ID)

Step 7: Enter credentials in Admin UI

  1. Open your Admin UI at https://<your-tenant>.clawcentral.io/
  2. Go to Settings → Tenant Settings → Secrets
  3. Add GOOGLE_CHAT_PROJECT_NUMBER with your project number as the value
  4. Add GOOGLE_CHAT_SERVICE_ACCOUNT_KEY with the full contents of the downloaded service account JSON file as the value
  5. Save each secret

Add to Google Chat

Once your credentials are saved and the app is live:

  1. Go to Google Chat
  2. Click the + (plus) icon next to Direct Messages
  3. Search for the App name you configured in the Google Cloud Console
    • Note: The bot will not appear in the "Marketplace" browse list because it is a private app. You must search for it by name.
  4. Select your bot from the results
  5. Click Add or Chat to start a 1:1 conversation
  6. Send "Hello" to trigger the assistant

How it works

  1. Google Chat sends webhook POSTs to ClawCentral. Each request includes an Authorization: Bearer <token> header.
  2. ClawCentral verifies the OIDC token against the configured Google Cloud project number automatically.
  3. Messages are routed by space:
    • DMs use session key googlechat:direct:<spaceId>
    • Spaces use session key googlechat:group:<spaceId>
  4. DM access uses pairing by default. Unknown senders receive a pairing code; approve it via the Admin UI.
  5. Group spaces require @-mention by default.

Targets

Use these identifiers for allowlists:

  • Direct messages: users/<userId> (recommended — stable)
  • Spaces: spaces/<spaceId>
  • Raw email addresses (name@example.com) are mutable and should not be used for allowlist matching

Capabilities

FeatureStatus
Direct messagesSupported
SpacesSupported
@-mentionsSupported (required in spaces by default)
ReactionsSupported (when enabled)
MediaSupported (size-capped per configuration)
Typing indicatorSupported (message mode by default)

Troubleshooting

405 Method Not Allowed

If Google Cloud Logs Explorer shows errors like:

status code: 405, reason phrase: HTTP error response: HTTP/1.1 405 Method Not Allowed

This means the webhook URL is not correct. Verify that the Chat app's HTTP endpoint URL in Google Cloud Console exactly matches:

https://<your-tenant>.clawcentral.io/webhooks/google-chat

No messages arriving

  • Confirm the Chat app's status is Live in Google Cloud Console
  • Verify your email is in the visibility list
  • Check that GOOGLE_CHAT_PROJECT_NUMBER and GOOGLE_CHAT_SERVICE_ACCOUNT_KEY are correctly saved in Admin UI → Settings → Tenant Settings → Secrets

Mention gating blocks replies

The bot only responds to @-mentions in spaces by default. To allow all messages in a space, contact support or adjust the group policy via the Admin UI.

Authentication errors

ClawCentral verifies the Google OIDC JWT using the project number. If you see auth errors, confirm the GOOGLE_CHAT_PROJECT_NUMBER value is the numeric project number (e.g., 123456789012), not the project ID string.