Google Chat
The Google Chat integration allows you to deploy a ChatBotKit AI bot directly into Google Chat spaces and direct messages. Users in your Google Workspace can @mention the bot in spaces or start a direct message conversation, and the bot will respond using the knowledge and instructions you have configured.
Each integration is tied to its own Google Cloud project and Chat app, so multiple users can independently run their own bots — each with their own credentials, configuration, and conversation history.
What You Can Do
With the Google Chat integration, you can:
- Space Conversations: Deploy the bot into any Google Chat space where it gets added, responding to @mentions or all messages depending on your auto-respond setting
- Direct Messages: The bot automatically responds to direct messages from users without needing to be @mentioned
- Thread Awareness: In spaces, the bot recognises threads and maintains conversation context within a thread so replies stay coherent
- Sender Filtering: Restrict which Google Workspace users can interact with the bot using the Allowed Senders field — useful for internal or team-specific bots
- Multiple Instances: Create multiple Google Chat integrations pointing at different Google Cloud projects, allowing you to run separate bots for different teams or use cases
- Automated Responses: Provide 24/7 AI-powered support inside your organisation's existing Google Chat workflow
How It Works
When a user sends a message to your Chat app — either by @mentioning it in a space or by sending a direct message — Google Chat POSTs the event as a JSON payload to the HTTP endpoint URL shown on this page. ChatBotKit validates the request using a JWT signed by Google's own infrastructure, processes the message through your configured bot, and sends the reply back via the Google Chat REST API using the service account credentials you provide.
The integration maintains per-user conversation context so each person talking to the bot gets a coherent, session-aware experience. Sessions expire based on the session duration you configure.
Getting Started
- Create the Integration: Give it a name and select the bot that will handle conversations
- Note the HTTP Endpoint URL: After saving, this page shows your unique webhook URL — copy it
- Set Up a Google Cloud Project: Go to Google Cloud Console, create a project, and enable the Google Chat API under "APIs & Services"
- Configure the Chat API: In "APIs & Services → Chat API → Configuration", set the HTTP Endpoint URL to your ChatBotKit endpoint and enable the functionality you need
- Create a Service Account: Under "IAM & Admin → Service Accounts", create a service account, grant it the "Chat API Bot" role, and download a JSON key
- Fill In Credentials: Paste the JSON key into the Service Account Key field and enter your Google Cloud Project Number (from the project dashboard)
- Save and Setup: Click Save, then click Setup to verify the connection
- Add to a Space: Ask a workspace admin to add your Chat app to a space, or start a direct message with it to test
Setting Up the Google Cloud Webhook
The HTTP Endpoint URL is how Google Chat delivers interaction events to ChatBotKit. Configure it in the Google Cloud Console:
- Open Google Cloud Console and navigate to your project
- Go to APIs & Services → Chat API → Configuration
- Under Connection settings, select HTTP endpoint URL and paste your ChatBotKit endpoint
- Under Functionality, enable Join spaces and group conversations if you want the bot in multi-user spaces
- Save the configuration — Google Chat will now forward events to ChatBotKit
Best Practices
Secure Your Credentials: The service account JSON key grants the ability to send messages on behalf of your Chat app. Store it carefully and rotate it if it is ever exposed. ChatBotKit stores it encrypted.
Enable JWT Verification: Always fill in the Project Number field in production. This ensures ChatBotKit only processes requests genuinely sent by your Google Chat app, blocking spoofed requests.
Control Who Can Interact: Use the Allowed Senders field to restrict access for internal bots. This prevents unexpected usage if the Chat app is accidentally added to a public space.
Configure Auto-Respond Carefully: By default the bot only responds to DMs and @mentions. In busy spaces with many human conversations, use the Allowed Senders filter instead of @all to avoid the bot interrupting unrelated discussions.
Session Duration: Google Chat conversations can have long gaps between messages. Consider setting a longer session duration (such as 4–8 hours) so users can return to a conversation without losing context.
Multiple Bots: You can create several Google Chat integrations — each pointing to a different Google Cloud project and Chat app — to run separate bots for different teams, languages, or purposes.
Practical Use Cases
Internal Knowledge Base: Deploy a bot in your company's Google Chat that answers questions about internal processes, HR policies, or technical documentation — available to employees directly inside Workspace.
IT Helpdesk: Let employees ask IT questions in a dedicated helpdesk space. The bot handles common troubleshooting steps and escalates to a human when needed.
Onboarding Assistant: Add the bot to onboarding spaces to help new employees find information, understand company processes, and get answers to frequently asked questions.
Project Space Bot: In a project-specific space, use the bot to field questions about project status, documentation, or meeting notes, keeping the team informed without manual effort.
Developer Support: Deploy a bot in your engineering spaces that answers questions about your codebase, APIs, or runbooks, surfacing information from your dataset directly in the conversation.
The Google Chat integration lets you bring conversational AI into the place where your team already communicates, without asking them to change tools or workflows.