Lambda timeout processing Genesys Cloud webhook payload

Is it possible to parse the nested data object in a Genesys Cloud conversation:call webhook using Node.js without triggering a Lambda timeout? My handler receives the event, but accessing event.body.data returns undefined. TypeError: Cannot read property ‘id’ of undefined. I’ve verified the payload via CloudWatch logs; the structure matches the docs, yet JSON.parse(event.body).data fails. Is the event envelope different in this context?

I typically get around this by checking if event.body is already parsed or needs JSON.parse(event.body) depending on your Lambda integration type, then accessing the nested structure via const payload = JSON.parse(event.body); const callData = payload.data;. The timeout often happens because the parser throws an error on malformed input before you even reach the data object, so wrap the parse in a try-catch and log typeof event.body to confirm if it is a string or object.