gochatbotdialogflow-cx

Dialogflow CX Webhook Response not showing in Test Agent


I have made a Golang Dialogflow webhook for returning the weather of a city at a particular day.
In the agent logs it shows that the request was a success to the webhook and in the golang logs I can see the request was a success with the below response :

{
    "fulfillmentResponse": {
        "messages": [
            {
                "text": {
                    "text": [
                        "The weather in mumbai on 2024-09-16 was Rain, Partially cloudy with a temperature of 27.70°C."
                    ]
                }
            }
        ],
    }
}

The format from what I have read from the docs looks to be okay. The response still does not get printed in the test agent chatbox. I am suck and desperately need help.

Anyone has ideas?


Solution

  • It turns out I had enabled flexible requests. It is no where specified that the responses also becomes flexible.

    The default Webhook response format goes for a toss if you enable flexible mode.

    Google needs to be more specific about this when we choose which mode the Webhook functions.