All Collections
Dialogflow Chatbot Tutorial
Advance Chatbot Development
How to capture Location Responses in Google Dialogflow
How to capture Location Responses in Google Dialogflow

This guide tells you how to capture User Location when they send you their Location Coordinates on WhatsApp

Shivam Aggarwal avatar
Written by Shivam Aggarwal
Updated over a week ago

When a user sends their location, WhatsApp shares latitude & longitude as coordinates.

User query received in Dialogflow on behalf of the user is in following format -


e.g. - location:28.502241,77.0841821

How to Capture Location Type User Query

Step 1 : Create Regular Expression Entity

Use this as regex - ^location:(-?\d+(\.\d+)?),*(-?\d+(\.\d+)?)$

Step 2: Create a New Intent

  • Give it a name

  • In training phrase put this as example - location:28.502241,77.0841821

  • Map @Location entity to it

  • Create a new parameter Location

  • Use $Location in place of Value & Default Value

  • Save

  • Test your Intent

Did this answer your question?