This release is a pre-release and may not be stable for production use.
Google Chat Plugin for elizaOS
Google Chat messaging integration for elizaOS agents, providing full support for Google Workspace team communication.
Features
- Messaging: Send and receive messages in Google Chat spaces
- Direct Messages: Support for 1:1 DM conversations
- Spaces: Manage presence in Google Chat spaces
- Threads: Reply in threaded conversations
- Reactions: Add and remove emoji reactions
- Attachments: Upload and download media files
- Webhook Support: Receive messages via configurable webhook endpoint
- Multi-language: TypeScript, Python, and Rust implementations
Installation
TypeScript/JavaScript
npm install @elizaos-plugins/plugin-google-chat
Python
pip install elizaos-plugin-google-chat
Rust
Add to your Cargo.toml:
[dependencies]
elizaos-plugin-google-chat = "2.0.0-alpha.1"
Prerequisites
-
Google Cloud Project: Create a project in the Google Cloud Console
-
Enable Google Chat API:
- Go to APIs & Services > Library
- Search for "Google Chat API" and enable it
-
Create a Chat App:
- Go to APIs & Services > Chat API > Configuration
- Configure your Chat app with a webhook URL
-
Service Account:
- Go to IAM & Admin > Service Accounts
- Create a service account with Chat API access
- Download the JSON key file
-
Configure the Chat App:
- Set the App URL (webhook endpoint)
- Configure the audience type and value
Configuration
Environment Variables
| Variable | Description | Required |
|---|---|---|
GOOGLE_CHAT_SERVICE_ACCOUNT |
Service account JSON string | One of these |
GOOGLE_CHAT_SERVICE_ACCOUNT_FILE |
Path to service account JSON file | required |
GOOGLE_APPLICATION_CREDENTIALS |
Default credentials path | |
GOOGLE_CHAT_AUDIENCE_TYPE |
Audience type: app-url or project-number |
Yes |
GOOGLE_CHAT_AUDIENCE |
Audience value for token verification | Yes |
GOOGLE_CHAT_WEBHOOK_PATH |
Webhook path (default: /googlechat) |
No |
GOOGLE_CHAT_SPACES |
Comma-separated list of spaces | No |
GOOGLE_CHAT_REQUIRE_MENTION |
Require @mention in spaces (default: true) |
No |
GOOGLE_CHAT_BOT_USER |
Bot user resource name | No |
GOOGLE_CHAT_ENABLED |
Enable/disable plugin (default: true) |
No |
Audience Configuration
App URL (Recommended):
- Set
GOOGLE_CHAT_AUDIENCE_TYPE=app-url - Set
GOOGLE_CHAT_AUDIENCEto your Chat app's App URL from the Cloud Console
Project Number:
- Set
GOOGLE_CHAT_AUDIENCE_TYPE=project-number - Set
GOOGLE_CHAT_AUDIENCEto your Google Cloud project number
Usage
TypeScript
import googleChatPlugin from "@elizaos-plugins/plugin-google-chat";
const agent = createAgent({
plugins: [googleChatPlugin],
// ... other config
});
Python
from elizaos_plugin_google_chat import get_plugin
plugin = get_plugin()
# Register with elizaOS runtime
Rust
use elizaos_plugin_google_chat::GoogleChatService;
let settings = GoogleChatSettings {
audience_type: GoogleChatAudienceType::AppUrl,
audience: "https://chat.googleapis.com/api/...".to_string(),
// ... other settings
..Default::default()
};
let service = GoogleChatService::new(settings).await?;
service.start().await?;
Actions
GOOGLE_CHAT_SEND_MESSAGE
Send a message to a Google Chat space.
Parameters:
text(string): Message contentspace(string): Target space name (e.g.,spaces/AAAA...)thread(string, optional): Thread name to reply in
GOOGLE_CHAT_SEND_REACTION
Add or remove an emoji reaction to a message.
Parameters:
emoji(string): Unicode emoji charactermessageName(string): Target message resource nameremove(boolean): Whether to remove the reaction
GOOGLE_CHAT_LIST_SPACES
List all spaces the bot is a member of.
Providers
googleChatSpaceState
Provides context about the current Google Chat space:
space_name: Space resource namespace_display_name: Human-readable space namespace_type: DM, ROOM, or SPACEis_threaded: Whether space uses threadsis_direct: Whether this is a direct message
googleChatUserContext
Provides information about the current user:
user_name: User resource namedisplay_name: User's display nameemail: User's email addressuser_type: HUMAN or BOT
Events
| Event | Description |
|---|---|
GOOGLE_CHAT_MESSAGE_RECEIVED |
Message received from a space |
GOOGLE_CHAT_MESSAGE_SENT |
Message sent successfully |
GOOGLE_CHAT_SPACE_JOINED |
Bot added to a space |
GOOGLE_CHAT_SPACE_LEFT |
Bot removed from a space |
GOOGLE_CHAT_REACTION_SENT |
Reaction added successfully |
GOOGLE_CHAT_CONNECTION_READY |
Service connected and ready |
Message Limits
- Maximum message length: 4,000 characters
- Attachments: 20 MB per file (configurable)
- Messages exceeding the limit are automatically chunked
Webhook Security
The plugin verifies incoming webhook requests using Google's authentication:
- App URL mode: Verifies ID token against the configured app URL
- Project Number mode: Verifies JWT with Google's public certificates
Requests that fail verification are rejected with 401 Unauthorized.
Resource Names
Google Chat uses resource names for identifying entities:
- Spaces:
spaces/{space_id} - Messages:
spaces/{space_id}/messages/{message_id} - Users:
users/{user_id}orusers/appfor the bot - Threads:
spaces/{space_id}/threads/{thread_id} - Reactions:
spaces/{space_id}/messages/{message_id}/reactions/{reaction_id}
Troubleshooting
Authentication Issues
- Verify service account JSON is valid
- Check that the Chat API is enabled
- Ensure the service account has Chat API permissions
- Verify audience type and value match your Chat app configuration
Webhook Not Receiving Messages
- Verify your webhook URL is accessible from the internet
- Check that the webhook path matches your configuration
- Ensure your server responds with 200 OK to POST requests
- Verify the Chat app is properly configured in Cloud Console
Permission Denied
- Check service account permissions
- Verify the bot is added to the target space
- Ensure proper IAM roles are assigned
Multi-language Support
This plugin provides parallel implementations in:
- TypeScript: Primary implementation with full feature support
- Python: Feature-complete using
aiohttpandgoogle-auth - Rust: Full implementation using
reqwestand async runtime
All implementations maintain consistent:
- Type definitions
- Action interfaces
- Provider outputs
- Event types
- Error handling
License
MIT License - see LICENSE for details.
Metadata
Release files for elizaos-plugin-google-chat 2.0.0a5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| elizaos_plugin_google_chat-2.0.0a5.tar.gz | 19.4 kB | Without provenance | Details for elizaos_plugin_google_chat-2.0.0a5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| elizaos_plugin_google_chat-2.0.0a5-py3-none-any.whl | Python 3 | none | any | Details for elizaos_plugin_google_chat-2.0.0a5-py3-none-any.whl |
Total release size: 38.3 kB
Release files / elizaos_plugin_google_chat-2.0.0a5.tar.gz
| Download URL | elizaos_plugin_google_chat-2.0.0a5.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77a214247dc7147c3ac98beb4407dbebbb04524544de6a25b231d6a3a192227f
|
|
BLAKE2b-256 checksum How to use checksums |
16c9aec11a1ded4a4d483d3dad1caba1d1c71e637db3821d2fc7c9dae548dc48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / elizaos_plugin_google_chat-2.0.0a5-py3-none-any.whl
| Download URL | elizaos_plugin_google_chat-2.0.0a5-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b336e4c2d9c992bff0fafa84940ed4fc2a00d7e8c32cec1145b4b2dd4940759
|
|
BLAKE2b-256 checksum How to use checksums |
cc9558ba1a56e749bd491bdd690e49e58b0109810ad11fc7515f940cb2e00155
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Security for elizaos-plugin-google-chat 2.0.0a5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.