How can I integrate the Google Actions responses in a webhook response in Dialogflow?

前端 未结 1 697
眼角桃花
眼角桃花 2021-01-25 01:01

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/ac

相关标签:
1条回答
  • 2021-01-25 02:00

    The documentation for Actions on Google still refers to the Dialogflow V1 protocol documentation and the node.js library from Google only supports the V1 protocol. Since it sounds like you're trying to use Dialogflow V2 Beta, you need to change how you've formatted the JSON.

    Instead of using the data.google data structure, as in V1, V2Beta uses the payload.google field (that is, a payload object that has a google object in it). (See https://dialogflow.com/docs/fulfillment#requirements under the "Response" section and click on the V2 tab.)

    The payload.google field would be set to the same thing the contents of the data.google field was set to.

    0 讨论(0)
提交回复
热议问题