Prerequisites
- A running Idun agent (engine)
- A Google Workspace account with access to Google Chat
- A Google Cloud project (free to create, no billing required for Chat API config)
- Your engine must be publicly reachable (use ngrok for local development)
Setup
- Manager UI
- Config file
Open the integrations catalog
Navigate to Integrations. The channel catalog shows available channels including Google Chat.
Create the Google Chat integration
Click + on Google Chat and fill in the credentials.
| Field | Value |
|---|---|
service_account_credentials_json | Full JSON key file content from your GCP service account |
project_number | GCP project number (found on the Cloud Console dashboard) |
How it works
- User @mentions the bot in a space or sends a direct message
- Google Chat POSTs the interaction event to your engine’s webhook
- Engine verifies the JWT bearer token (signed by
chat@system.gserviceaccount.com) using the project number as audience - Engine extracts the message text (stripping the @mention prefix via
argumentText) - Engine invokes the agent with the cleaned text
- Engine sends the agent’s reply back via the Google Chat API (
spaces.messages.create)
users/123456) is used as the session ID, so conversation context is maintained per user.
Bot messages ignored: The handler skips messages from senders with type BOT to avoid infinite loops.
@mention stripping: Google Chat provides an argumentText field that contains the message text without the @mention. The engine uses this so your agent receives clean input (e.g. “do stuff for me” instead of “@BotName do stuff for me”).