When you receive the webhook from dialogflow, do whatever you need to do with the intent and parameters and then return the response to dialogflow. In BotController.ts, or wherever you execute the runQuery function, just await the result then send that to Whatsapp.
Hi,
From my understanding, what you're looking to achieve is something like this:
I have updated the repo to include a controller for Dialogflow webhook. github.com/newtonmunene99/wa-chatbot
When you receive the webhook from dialogflow, do whatever you need to do with the intent and parameters and then return the response to dialogflow. In
BotController.ts
, or wherever you execute therunQuery
function, just await the result then send that to Whatsapp.Thank you so much @newton !
I'll look at it right now, have a great day my friend!