Invalid response from webhook: Failed to translate JSON to ExecuteHttpResponse

Trying to get Webhook reply repond to the google assistant. No matter what format I used got the following answer in Google Log:

Invalid response from webhook: Failed to translate JSON to ExecuteHttpResponse

and the webhookResponse in the Google assistant log shows:

{
  "responseJson": {
    "payload": {
      "google": {
        "expectUserResponse": true,
        "richResponse": {
          "items": [
            {
              "simpleResponse": {
                "textToSpeech": "this is a simple response"
              }
            }
          ]
        }
      }
    }
  }
}

Besides the jsonResponse{…} the rest of the text is in the “reply Body” of the Webhook reply

Thanks

Hey @Nicolas_Assouad,

Would you be able to share a screenshot if your Webhook Reply configuration?

Also, would you be able to tell me more about your use case and what you are building with Losant when you are receiving this issue?

Thank you,
Heath

Webhook reply

{
“payload”: {
“google”: {
“expectUserResponse”: true,
“richResponse”: {
“items”: [
{
“simpleResponse”: {
“textToSpeech”: “this is a simple response”
}
}
]
}
}
}
}

Doc1.zip (124.3 KB)

@Nicolas_Assouad,

I can think of three possible causes for this:

  1. I’d double confirm that the body of the request matches what Google expects.
  2. You can always test for valid JSON using jsonlint.com
  3. You man need to set a Content Type to application/json within the Webhook Reply Node.