Did you try to use the Dialogflow REST API v2 and found out that your webhook which used to work before stopped working?
Here is what the two JSON formats look like when inspected side to side
Given that the root object - "result" vs "queryResult" - is already named differently, your webhook will fail almost no matter what code it executes.
Also note that there is a warning about this in Dialogflow's console when you try to enable the v2 API.
As soon as you flip the switch, Dialogflow's v2 API will start sending webhook requests in the new JSON format. Before you do that, make sure you understand the JSON structure and handle it appropriately in your webhook.