Request User Location
The WhatsApp Location Request function allows you to request a user's location through WhatsApp. This function creates an interactive message with a location request button that prompts the user to share their current location.
Implementation
To use this function in your Voiceflow project:
Upload the custom function downloaded from the Custom Functions page on your FlowBridge environment, to your Voiceflow project as a custom function.
Add a Custom Function block in your Voiceflow flow.
Select the uploaded WhatsApp location request function.
Configure the input variables
Input Parameters
The function accepts the following input parameter:
bodyText: The message to display when requesting the location (e.g., "Please share your location to find nearby stores")
If no bodyText is provided, a default message "Please share your location" will be used.
Accessing Location Data
When a user responds with their location, the following variables will be available in your Voiceflow project:
location_address: The address of the shared location (if available)location_latitude: The latitude coordinatelocation_longitude: The longitude coordinatelocation_name: The name of the location (if available)location_url: A URL to the location (if available)
Once location data is received, we will also automatically send a message as text to Voiceflow which contains a stringified JSON object of the location data. This is done so that you can use a capture step to wait for the reponse, and continue after.
Example



Last updated
