How to Convert Latitude & Longitude into Address Details in Power Automate
When you’re building an application like an attendance system, one common requirement is to capture the location of the employee at the time of sign-in or sign-out. Instead of just storing latitude and longitude values, it’s often more useful to fetch readable details such as the address, city, state, country, and postal code.
The good news: you don’t need expensive services to achieve this. With Power Automate and free reverse geo-location APIs, you can do this in a few simple steps

.
Why Use Reverse Geo-Location?
Reverse geo-location is the process of converting latitude and longitude into a human-readable location.
Step 1: Pick a Reverse Geo-Location Service (no API key needed)
We’ll use OpenStreetMap Nominatim (free; no API key required).
Endpoint information: https://nominatim.openstreetmap.org/reverse?lat=<value>&lon=<value>&<params>
Step 2: Create the Flow and Inputs
Create a Manually trigger a flow (for demo—you can replace with your real trigger).
Add two Text inputs:
Latitude
Longitude


Step 3: Call Nominatim with HTTP
Add an HTTP action (built-in).
Method: GET
URI:

Next
Add a Compose action.
Inputs: select Body from the HTTP action’s Dynamic content (or use expression body('HTTP')).


Step 4: Use Select to capture only the required fields
Power Automate’s Select expects an array as its From input. When your data is a single XML/JSON object, you can feed Select a dummy one-item array (e.g., createArray(1)) and then build each mapped value with expressions. The result will be an array with a single object containing only your desired keys.
Key | Value |
Neighbourhood | xpath(xml(outputs('Compose')), 'string(//addressparts/neighbourhood)') |
Suburb | xpath(xml(outputs('Compose')), 'string(//addressparts/suburb)') |
City | xpath(xml(outputs('Compose')),'string((//addressparts/city) |
State | xpath(xml(outputs('Compose')),'string(//addressparts/state)') |
Country | xpath(xml(outputs('Compose')),'string(//addressparts/country)') |
Pincode | xpath(xml(outputs('Compose')),'string(//addressparts/postcode)') |

With the steps above, you now have a working flow that takes Latitude and Longitude, calls a free reverse geo-location service (like Nominatim), extracts only the required fields (City, State, Country, Pincode, etc.) using Select and XPath/JSON parsing, and outputs a clean object.

This final result can then be directly consumed in your Power Apps attendance application. Instead of storing just raw GPS coordinates, you’ll have meaningful details such as:
Neighbourhood
Suburb
City
State
Country
Pincode
These values can be saved in your attendance records alongside the employee ID and timestamp—making your solution more accurate, transparent, and HR-friendly.
I hope you found this guide helpful! If you have any questions or need support, feel free to leave a comment or reach out — I’ll be happy to help.



Comments