I Published a Hosted feature service using query layer with Lat and Lons from non spatial database on to the ArcGIS Online. I just wanted to create a Power Automate, if some thing changes in non spatial database like lat and long, it should update the feature layer without writing a new python script to update that hosted feature service.
I guess, it is possible to update through arcgis online connector in Power automate. Could some one help us to solve this issue?
Here’s a minimal, working pattern (no Python needed):
Trigger (pick one):
SQL Server / PostgreSQL row change trigger (premium) — fires on update
or a Scheduled flow that queries rows changed since last run (using a LastModified column)
Steps:
Get changed row (must include a unique key and lat, lon).
Prefer a stable key (e.g., AssetID). Don’t use OBJECTID.
If you can store the feature’s GlobalID in the DB, even better.
ArcGIS Online → Update a record in a feature layer
Where clause (string key):
(If numeric: no quotes.)
Or, if you stored it:
Attributes: map fields you want to update (e.g., Status, Notes, etc.)
Geometry (point):
(If your layer is in Web Mercator 3857/102100, either send 4326 and let the service project, or pre-project before sending.)
(Optional) Upsert logic
If the update returns 0 records affected, call Create a record in a feature layer with the same attributes + geometry (i.e., insert when missing).
OBJECTID is not stable → don’t match on it. Use a real business key or store the GlobalID back to your DB when you first create features.
Ensure lat/lon are not null; skip the update if either is blank.
If many rows change at once, switch to Update records in a feature layer (batch) and pass a WHERE like AssetID IN ('A1','A2',...), or loop with concurrency 1–5 to avoid throttling.
Keep the field names identical between your DB and the feature layer (or map them carefully in Attributes).
In your DB table: AssetID (unique), lat, lon, Status, LastModified
In the hosted feature layer: same fields + GlobalID (enabled)
(Optional) Store the feature’s GlobalID back to your DB on first insert to make future updates bulletproof.
If you share your actual key/field names (and the layer’s WKID), I’ll give you the exact WHERE line and the Geometry JSON you can paste into the Power Automate action.
Thanks . How do I update lat and Lon for a feature class in geodatabase ? Do we need to publish as feature layer to update ?
@vijaybadugu - That's the easier option. PowerAutomate can update feature layers.
I don't think there is any action within PowerAuotmate to update GDB directly unless you want to update the SQL DB directly. I would advise against the direct DB updates as they bypass the tracking and any attribute rules, etc.