Search code examples
geolocationdialogflow-esdialogflow-es-fulfillment

Get current user location with dialogflow-fulfillment library


I am creating a Dialogflow chatbot using dialogflow-fulfillment Nodejs Client library and will integrate it with a smartphone application. I want to fetch the user location but on the Internet, I could only find the helper functions for actions-on-google which I believe only works for Google Assistant. What I want to do is if a user says Swimming places near me, it automatically fetches its location.


Solution

  • If Chatbot is integrated in a mobile app or web app, fetch location data on app level and send it in meta-data/custom payload when making query request to dialogflow

    Dialogflow fulfilment is a helper library which is a wrapper on https api, whatever you can with dialogflow rest apis you can do the same with dialoglfow fulfilment library