Select to view content in your preferred language

Geocoded SharePoint data displayed dynamically in ArcGIS online map

154
3
2 weeks ago
AdamRoesel
New Contributor

Hello,

I've got some flows running that give me a SharePoint list with geocoded records, and a .csv file with geocoded records.

What I would like to do is use one of those as a data source to create a map that updates each time the list or the .csv file updates, and displays those records on a map. Ideally this would be done automatically and will not require me to manually run a flow or edit a feature layer.

I've created a hosted feature layer using a blank .csv as a template, so I have a spot for the updated List or .csv data to land in ArcGIS online. I just can't figure out how to get it from the List or SharePoint hosted .csv, to that feature layer, automatically, each time.

My brain is fried at this point. Does anyone have any suggestions?


Tags (3)
3 Replies
AustinAverill
Frequent Contributor

This is going to be a bit lengthy, so bare with me. I will include a picture of an overall example flow 

AustinAverill_0-1758110105734.png

This example operates for individual additions to a SharePoint list. If you bulk add items, it may be more effective to use a timed/manual trigger and then use the "Get Items" action with an appropriate query to pull the data. If you use this method, the following steps would just need to nested inside of a "Apply to each" action so that it loops through each row that was added to the list.

 

The first step will be to parse your X and Y variables from the location attribute in the list. In the example, my coordinates are listed as ['DispName'] in the body as a pair in string format. So, I parse those and convert them to a float as follows: 

AustinAverill_1-1758110485013.png

After I have my x and y coordinates parsed and available, I find it a best practice to initialize a new variable to create the JSON for my feature. Just remember that when you add string data into the attributes section from your list item response, you need to surround it in quotes for proper JSON syntax:

AustinAverill_2-1758110612726.png

Once you have the feature json definition ready, you can generate a token, and sent the POST request to add the feature to your AGOL layer. (If you are doing a batch of features instead of one, you should move the generate token action to before your "Apply to each" action set so that you aren't creating unneeded overhead). So first, generate your token: 

AustinAverill_3-1758110886033.png

Then, you can send the POST request to add the feature to your hosted feature layer using the token from the previous request and the json object created for the new feature.

AustinAverill_4-1758113205880.png

 

Finally, it is a good idea to keep a column on your sharepoint list for the hosted objectid. Once you add the feature, the JSON response will include the objectid for the created feature that you can use to update your list item. This will be useful later if you want to set up other flows to update or remove items on the hosted feature layer using the editFeatures method.

AustinAverill_5-1758113304375.png

One final note to keep in mind is that the standard geometry pair that is given with sharepoint geometry is WKID 4326. If your hosted feature layer is not in this spatial reference you will need to add a request into the flow to use the project utility from Arcgis or some other service that would allow you to project the coordinate to the required reference.

 

 

 

0 Kudos
AustinAverill
Frequent Contributor

Probably also worth mentioning that his can be made slightly less complicated using the ArcGIS Connectors if you pay for them. But if you don't using HTTP requests and the REST API gets the job done for sure.

0 Kudos
RaajRaaj
Esri Contributor

Hello @AdamRoesel --

 

We are in the process of adding a feature enhancement in the October 2025 release of ArcGIS for SharePoint which would allow you to automate geocoding SharePoint lists using this new feature enhancement. The automation capability will be added to the existing "Geoenablement" feature. Similar to the "Extract EXIF Data" feature, you will be able to set up a "Geoenablement" workflow by leveraging the "ArcGIS" connectors but the app will take care of setting up the flow (behind the scenes). As a user, you would just need to select your "Power Automate Environment, "ArcGIS" and "SharePoint" connections and that's all.

 

Stay tuned! 

 

I will be posting a blog update (on Esri Community) once the app is updated in Microsoft App Source.

 

https://appsource.microsoft.com/en-us/product/office/wa200003118?tab=overview

 

 

Special thanks to @AustinAverill for your detailed post on setting up a Power Automate flow to accomplish @AdamRoesel's workflow.

 

Please let me know if you have any questions.

 

Thanks & Regards,

Raaj

0 Kudos