Choosing an event delivery mode
Google Chat can deliver events to Noxus in two ways. Pick one before you configure the deployment.Setting Up the Google Chat Deployment
There are two ways to authenticate the bot: as a workspace user via OAuth (the Noxus-managed Google account flow) or as an app-style bot via a Google Cloud service account. Pick the option that matches how you want the bot to appear in Chat.Option A: Connect with a Google Workspace user (OAuth)
The simplest path. The bot acts on behalf of the connected user — messages it sends are attributed to that user and it can only post in spaces the user has access to.Create a Google Chat connection
Create a Google Chat deployment
Enter the space resource name
spaces/AAAAxxxxxxx.Paste it into Space resource name in the deployment configuration.Activate the deployment
Option B: Connect with a service account (app-style bot)
Use this option when you want a dedicated bot identity (separate from any human user) — the recommended path for production deployments and required for domain-wide delegation.Create a Google Cloud Chat app
Set the HTTPS connection settings
Create a service account key
https://www.googleapis.com/auth/chat.bothttps://www.googleapis.com/auth/chat.messageshttps://www.googleapis.com/auth/chat.messages.reactionshttps://www.googleapis.com/auth/chat.spaceshttps://www.googleapis.com/auth/chat.memberships
Enter credentials in Noxus
- Service account JSON — paste the entire contents of the JSON key file
- Impersonation subject (optional) — only set this if you’ve configured domain-wide delegation in Google Workspace and want the bot to act on behalf of a specific user (e.g.
[email protected])
Add the bot to a space and activate
spaces/AAAAxxxxxxx). Paste it into Space resource name on the deployment, then set the deployment Online. Noxus invites the bot to the space automatically.Option C: Cloud Pub/Sub delivery
Use this when the Noxus relay can’t accept inbound HTTPS — for example, on-prem deployments or VPC-locked environments. Instead of Chat POSTing events to a URL, Chat publishes them to a Cloud Pub/Sub topic in your Google Cloud project. Noxus pulls from a subscription on that topic with service-account credentials. This mode reuses the service-account Chat connection from Option B above (Pub/Sub delivery is not compatible with OAuth-user credentials).Create the Pub/Sub topic and subscription
chat. The full topic name will be projects/YOUR_PROJECT/topics/chat.Create a pull subscription on that topic — for example, chat-sub, with name projects/YOUR_PROJECT/subscriptions/chat-sub. Defaults are fine; no push endpoint is needed.Grant "Pub/Sub Publisher" to the Google Chat service agent on the topic
roles/pubsub.publisher role.Grant "Pub/Sub Subscriber" to your Noxus service account on the subscription
roles/pubsub.subscriber role.Configure the Chat app to publish to the topic
projects/YOUR_PROJECT/topics/chat). Save.Configure the Noxus deployment
projects/YOUR_PROJECT/subscriptions/chat-sub) into the Pub/Sub subscription field.Set the deployment Online. Noxus runs a one-shot Pub/Sub pull as part of activation to confirm the subscriber role is in place — if either IAM grant is missing, activation fails with an actionable error before the deployment goes live.Deployment Settings
Once your Google Chat connection is established, configure how the agent behaves. Settings are organised into the sections below.Deployment
Configuration
Conversation Triggers
A new conversation starts when a user posts in the configured space. You can optionally restrict to direct messages or filter by keyword.Reply Behavior
Channel Tools
Toggle which Google Chat-specific tools the agent can use during conversations.Rate Limits
Display
Troubleshooting
Activation fails with 'cannot add the bot to the space'
Activation fails with 'cannot add the bot to the space'
chat.memberships scope. For OAuth, reconnect and grant the Manage memberships permission. For a service account, add the https://www.googleapis.com/auth/chat.memberships scope to the SA and either re-grant domain-wide delegation or invite the bot to the space manually.No events arrive at the deployment
No events arrive at the deployment
- The URL pasted into Cloud Console (Chat API → Configuration → Connection settings → HTTP endpoint URL) matches the Webhook URL banner on the deployment exactly — same scheme, host, and path. Google signs the JWT with that URL as the audience, and Noxus verifies the audience against
RELAY_URL + /webhooks/<group_id>. A mismatch logs[GCHAT] JWT rejected (expected_aud=...)in the relay and returns 401. - The bot is invited to the space. For service-account auth this happens automatically at activation. For OAuth-user auth, the user must be a member of the target space.
The bot's reply shows in conversation history but never appears in Chat
The bot's reply shows in conversation history but never appears in Chat
chat.googleapis.com/v1/{space}/messages returns 403. Add the chat.messages scope (OAuth) or grant the corresponding scope to the service account, then reconnect.The bot replies in spaces but ignores direct messages (or vice versa)
The bot replies in spaces but ignores direct messages (or vice versa)
DIRECT_MESSAGE. Disable it to respond in spaces and rooms as well.Pub/Sub mode: activation fails with a permissions / IAM error
Pub/Sub mode: activation fails with a permissions / IAM error
PermissionDenied … pubsub.subscriptions.consume— the service account whose JSON key you uploaded to Noxus is missingroles/pubsub.subscriberon the subscription. Grant the role on the subscription (not the topic). The error message includes the exact SA email and subscription path to grant against.NotFound … subscription— the subscription resource name is wrong, or it exists in a different Google Cloud project than the one in the path. Double-check the project ID and subscription name.
Pub/Sub mode: deployment is online but no events arrive
Pub/Sub mode: deployment is online but no events arrive
- Publisher role. On the topic, grant
roles/pubsub.publisherto the Google-side Chat service agent (service-<PROJECT_NUMBER>@gcp-sa-gsuiteaddons.iam.gserviceaccount.com, shown in Chat API → Configuration → Service Account Email). This is the most common cause. - Verify the pipe with
gcloud. Pull the subscription directly while sending a test message:If the pull returns no messages, Chat is the problem (recheck the publisher role and the topic name in Chat API → Configuration). If the pull returns messages but Noxus isn’t reacting, check the deployment’s Events tab — runtime failures (e.g. a revoked subscriber role) surface there with the exact exception class and message. - Bot membership. Pub/Sub mode receives events for every space the Chat app is in — but Chat only generates events for spaces where the bot has been invited or for DMs that users have initiated. Start a DM with the bot (or
@mentionit in a space) so Chat has something to publish.