#15643: fix(googlechat): DM's works, but groups don't - return add-on action envelope for webhook acks
channel: googlechat
stale
size: XS
Cluster:
Webhook Configuration and Resilience
I couldn't make Google Chat works with groups/spaces (in DM's it worked ok). Creating sample server confirmed json key is working ok for both DM and groups.
## Summary
Google Chat add-on interaction payloads (`commonEventObject.hostApp = "CHAT"`) were being accepted and processed, but the webhook ACK response used a bare `{}` body.
For add-on flows, Chat expects an action envelope (`hostAppDataAction.chatDataAction`). Returning `{}` can cause the UI to show "Tik not responding" even when the event is processed correctly.
This change:
- detects add-on payloads in the Google Chat webhook handler
- returns a valid add-on ACK envelope:
- `{"hostAppDataAction":{"chatDataAction":{}}}`
- keeps existing behavior for non-add-on payloads (`{}`)
## Why
This avoids false "not responding" errors in Google Chat add-on mode while preserving async processing in OpenClaw.
## Scope
- File: `extensions/googlechat/src/monitor.ts`
- No config/schema changes
- No changes to outbound message logic
## Test Plan
- [x] Reproduced issue path with Google Chat add-on payloads (DM + space mention)
- [x] Confirmed payloads are delivered to webhook
- [x] Confirmed OpenClaw processes events asynchronously after ACK
- [x] Verified handler now returns add-on envelope for add-on payloads
- [x] Verified non-add-on path still returns `{}`
## Notes
This is a compatibility fix for Google Workspace add-on webhook response shape and should be safe for existing Chat API interaction flows.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This change updates the Google Chat webhook handler to return the `hostAppDataAction.chatDataAction` envelope when the incoming request is a Google Workspace Add-on–formatted Chat event (`commonEventObject.hostApp === "CHAT"` with `chat.messagePayload`). For non–Add-on payloads, it continues to return an empty JSON object.
This fits the existing design where the webhook acks immediately (HTTP 200) while `processGoogleChatEvent(...)` continues asynchronously in the background, and aligns with the repo’s existing add-on token/issuer support in `extensions/googlechat/src/auth.ts`.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- The change is small, localized to the webhook ack response, preserves prior behavior for non–Workspace Add-on payloads, and is consistent with existing add-on request parsing and auth verification patterns. No correctness or runtime issues were found in the updated logic.
- No files require special attention
<sub>Last reviewed commit: 1389179</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#20554: fix(googlechat): prevent infinite restart loop in startAccount
by Gitjay11 · 2026-02-19
78.9%
#3727: fix(googlechat): space type detection for modern API
by gustavozirbes · 2026-01-29
77.4%
#3837: fix(googlechat): space events response and thread reply context
by rehanchrl · 2026-01-29
76.4%
#14940: fix(googlechat): convert Markdown formatting to Google Chat markup
by brandonwise · 2026-02-12
73.6%
#7940: fix(googlechat): add messageReplyOption for proper thread replies
by sapko7a · 2026-02-03
73.6%
#20551: fix(googlechat): prevent health monitor restart loop and add JWT ve...
by FredCat32 · 2026-02-19
73.3%
#20395: fix(googlechat): prevent infinite auto-restart and ambiguous-target...
by ggalmeida0 · 2026-02-18
72.8%
#16733: fix(ui): avoid injected newlines when tool output is hidden
by jp117 · 2026-02-15
72.6%
#19043: googlechat: fix runtime.error signature in startup error handling
by markesphere · 2026-02-17
72.3%
#22322: fix(googlechat): keep webhook monitor alive until abort
by AIflow-Labs · 2026-02-21
71.9%