Problem
GC sits at 2025-04.130.0. The analytics.conversations.events webhook hits the Express route with a null botId after NLU handoff. Node 20.11.0 throws a TypeError on validation. JWT checks out.
{ "botId": null }
TypeError: Cannot read properties of null (reading ‘languageCode’)
Payload structure shifted again. Queue’s doing jack all.
Check your webhook subscription filters first. If you’re listening to analytics/conversations/events without a specific filter for botInteractions, the payload structure changes depending on whether the event originates from a human agent or the bot engine. You’re likely hitting a mixed-event batch where the botId is legitimately null for agent-handled segments, causing that TypeError.
You need to guard against null before accessing nested properties. Also, make sure you’re using the webhook:read scope on the token validating the signature, otherwise you might be getting stripped payloads if the integration has limited permissions.