Geocode Sharepoint lists using Power Automate template

942
0
10-24-2022 02:02 PM
RaajRaaj
Esri Contributor
0 0 942

In the past, ArcGIS Maps classic app had a “locate workflow” utility which was built-in to the ArcGIS for SharePoint app (classic). Since we have migrated to SharePoint modern experience and built the new ArcGIS for SharePoint app on SPFx framework, users can no longer use the “locate workflow” utility. Moreover, the “locate workflow” had a lot of limitations including the fact that geocoding a SharePoint list containing more than 150 rows will result in a SharePoint throttling error (due to limitations within SharePoint).

The good news is that with Power Automate, those limitations have been mostly eliminated.

The SharePoint locate workflow template can be downloaded from the Power Automate templates catalog. Search the Power Automate templates catalog for “SharePoint Locate Workflow”.

 

RaajRaaj_1-1666645029018.png

 

 

Note: I need to sign in with my SharePoint org credentials in order to download the template.

Click on “Continue”.

 

RaajRaaj_2-1666645046653.png

 

Now let’s geocode the below SharePoint list, using the downloaded Power Automate template.

 

As you can see in the above image, the SharePoint list contains a column with addresses for Apiaries in the state of Illinois.

The SharePoint Locate Workflow template contains all the necessary connectors set up in the flow including the custom ArcGIS connector.

With this template, SharePoint users with no prior knowledge of Power Automate can easily set up a geocoding workflow with just a few simple steps. The steps are outlined as below:

 

Step 1

RaajRaaj_3-1666645046658.png

 

 In step 1, I will point the “Site Address” to the SharePoint site containing the SharePoint list. Also, I will specify the “List Name”. Optionally, I can also specify the “Top Count” for the list (total number of rows in the list)

 

Step – 2

RaajRaaj_4-1666645046660.png

 

In step 2, the “Apply to each” action will loop through each row in the SharePoint list and will terminate when it reaches the last row in the SharePoint list.

In the “Find address candidate” custom ArcGIS connector, I will first “Add new connection” by opening the menu for the connector (click on the ellipsis"...") and the credentials for your ArcGIS org account. Next, I will choose “Yes” to store results. In the address field of the “Find address candidate” of the connector, we will specify the column in the SharePoint list that contains the addresses. Also, specify the country to be used by the geolocator, in this case its “United States”.

Once the “Find address candidate” ArcGIS connector is able to geocode the SharePoint list, the next action is to update the SharePoint list with the coordinates for each row.

RaajRaaj_6-1666645046665.png

 

As you can see in the above image, I have added columns X,Y in the SharePoint list to store the coordinates output from “Find address candidate” connector.

In the “Update item” connector, we will once again point the connector to the site containing the SharePoint list and also specify the name of the SharePoint list that has to be geocoded.

The “Id” field in the “Update item” connector has to be mapped to the “ID” derived from “Get items” in Step 1.

Since I want to store the output from “Find address candidate” in columns X and Y, we will map X to “Longitude (X)” and “Latitude (Y)”.

I will then “Save” the flow.

I can now use the “Flow checker” to find errors or warnings in the flow. If the “Flow checker” shows no errors or warnings, it’s always recommended to “Test” the flow.

 

 

 

 

 

 

RaajRaaj_7-1666645046667.png

 

Since this flow is triggered manually, choose the option “Manually” and click “Test”.

RaajRaaj_8-1666645046667.png

 

Once the test run is kicked off, the status of the flow is displayed at the top.

RaajRaaj_9-1666645046668.png

 

After the flow runs successfully, I can now check the SharePoint list to see if it’s geocoded.

RaajRaaj_10-1666645046678.png

 

The image above shows the geocoded SharePoint list with the coordinates corresponding to each address populated in columns X and Y.