Google chat custom cards using dialogflow fulfilment webhook

后端 未结 1 1142
面向向阳花
面向向阳花 2021-01-14 14:22

I am trying to integrate DialogFlow bot with Hangouts Chat (for G Suite). I have enabled the integration on DialogFlow and the basic intents are working fine.

In orde

相关标签:
1条回答
  • 2021-01-14 15:05

    As far as I know, responding to a Google Chat (formerly Hangouts Chat) button isn't possible when using the direct Dialogflow integration.

    The problem is that the button response can be sent one of two ways:

    • An event will be sent back to the bot code indicating the click.
    • Using the onClick.openLink.url property, as most of your test show. This will take the person clicking it to the URL in question. But once there, you're taken out of the bot flow.

    However, the documentation for the Hangouts Chat integration with Dialogflow doesn't provide any information about how this event is passed to Dialogflow, and the last time I tested it - it isn't.

    You can write your own integration using Google Chat's API on something like Cloud Functions or Apps Script and have your script call Dialogflow's Detect Intent API to determine what Intent would be triggered by the user (and determine replies or call the webhook for additional processing). Under this scheme, you can choose how to handle the onClick event. Making your own integration also provides you a way to do Incoming Webhooks, which isn't possible when using the Dialogflow integration.

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