1

As the title suggests, I made a assistant agent in DialogFlow but now I need my assistant to be called when I press a button inside the app, I checked out react-native-dialogflow but it is not supported anymore and is giving me errors in my app.

1 Answers1

0

You could create a Dialogflow client (I'd recommend to use Node.js):

https://cloud.google.com/dialogflow/docs/quick/api?hl=es-419#detect-intent-text-nodejs

Then, You will be able to connect the app to the Dialogflow client through REST (for example using a POST as a verb) to send and receive messages from the assistant

It's needed to develop a chat component in your app to show the conversation. After that, you could integrate the assistant where you want easily

The architecture for your app will be: App <-> Dialogflow client <-> Dialogflow

For Google assistant will be: Google Assistant <-> Dialogflow

Your assistant will be deployed in two different channels but both will use same Dialogflow agent

Stiben
  • 104
  • 11
  • 1
    Thanks. I dont want my app to have its own Google Assistant, so I dont need chat a component. I want it to send a command like "Ask my Smart Home Assistant to turn on light" which will be handled by my Pixel's inbuilt Google Assistant. Or if thats not possible then at least just trigger my phone's google assistant when I press a button in the app. – Overdrive141 Jun 11 '20 at 06:32
  • @Overdrive141 did you manage to solve it? I want to do the same thing :) – Fernanda Toledo Jan 20 '23 at 12:02