Getting address based on latitude and longitude from Bing maps using Power Automate Flow.

Hello Guys,

In our previous blog we have seen how to display maps in canvas application. Today we are going to explore more about Bing Maps and Power Automate Flow.



Do follow us to know more about Dynamics and Power Platform. Also if you like our blog then please comment and share this blog with your friends.

Today we are going to see how we can retrieve address based on latitude and longitude using Bing maps and Microsoft Power Automate Flow. We will be creating a flow which will be triggered on creation of contact entity. Here we go.

Visit https://make.powerapps.com and select your environment and solution.



Now click on new and add a new automated cloud flow and configure it as shown below:



Configure first step as shown below:



Now add a new step and search Bing Maps, and select Get location by point(preview) and configure it as shown below:



Add a new step, search parse JSON and configure it as shown below:



You can use below schema:

{
    "type""object",
    "properties": {
        "__type": {
            "type""string"
        },
        "bbox": {
            "type""object",
            "properties": {
                "southLatitude": {
                    "type""number"
                },
                "westLongitude": {
                    "type""number"
                },
                "northLatitude": {
                    "type""number"
                },
                "eastLongitude": {
                    "type""number"
                }
            }
        },
        "name": {
            "type""string"
        },
        "point": {
            "type""object",
            "properties": {
                "type": {
                    "type""string"
                },
                "coordinates": {
                    "type""object",
                    "properties": {
                        "latitude": {
                            "type""number"
                        },
                        "longitude": {
                            "type""number"
                        },
                        "combined": {
                            "type""string"
                        }
                    }
                }
            }
        },
        "address": {
            "type""object",
            "properties": {
                "addressLine": {
                    "type""string"
                },
                "adminDistrict": {
                    "type""string"
                },
                "adminDistrict2": {
                    "type""string"
                },
                "countryRegion": {
                    "type""string"
                },
                "formattedAddress": {
                    "type""string"
                },
                "locality": {
                    "type""string"
                },
                "neighborhood": {
                    "type""string"
                },
                "postalCode": {
                    "type""string"
                },
                "countryRegionIso2": {
                    "type""string"
                }
            }
        },
        "confidence": {
            "type""string"
        },
        "entityType": {
            "type""string"
        },
        "geocodePoints": {
            "type""object",
            "properties": {
                "type": {
                    "type""string"
                },
                "coordinates": {
                    "type""object",
                    "properties": {
                        "latitude": {
                            "type""number"
                        },
                        "longitude": {
                            "type""number"
                        },
                        "combined": {
                            "type""string"
                        }
                    }
                },
                "calculationMethod": {
                    "type""string"
                },
                "usageTypes": {
                    "type""array",
                    "items": {
                        "type""string"
                    }
                }
            }
        },
        "matchCodes": {
            "type""array",
            "items": {
                "type""string"
            }
        }
    }
}

Now add a new step and search update row and configure its as shown below:





So our flow is ready. Now we will be creating one contact record and check whether address field is updated or not.






As you can see address is updated.

Hope it helps...
























































 





Comments

Popular posts from this blog

Read Only Sub Grid & Editable Sub grid in Dynamics 365

Understanding Sales Process in D365.

Understanding Business Unit in Dynamics 365.