I am trying to figure out how I can embed Google Actions responses, such as the cards carousel, in a webhook response for DialogFlow.
On https://developers.google.com/actions/dialogflow/webhook, I found the following information:
The response format of the Dialogflow webhook contains the standard Dialogflow webhook response contents and a data.google object that closely resembles a standard conversation webhook response with the following general differences.
So I tried extending the webhook response with a data.google
structure as following:
{
"fulfillmentText":"Please select any card you like.",
"data":{
"google":{
...
}
}
}
When testing in the console, I get the following error:
Webhook call failed. Error: Failed to parse webhook JSON response: Cannot find field: data in message google.cloud.dialogflow.v2beta1.WebhookResponse.
Looking to the definition of WebhookResponse
, it looks like there is indeed no data
field.
I am going around in circles. My question is basically: how can I enrich Dialogflow webhook responses with Google Actions responses?