Power Automate to create a record in AGOL FeatureLayer

1020
3
Jump to solution
07-04-2023 07:30 PM
gis_KIWI4
Occasional Contributor

Hi, 

We have a sharepoint list that we'd like to replicate in the AGOL via power automate. 

The hurdle for us how do we set up the "Create a record in a feature layer" connector. We have tried passing the "geometry" parameter multiple ways. We have tried -

x,y

AND 

 "geometry": {
"x": 1436052.3270733608,
"y": 5002615.309330223,
"spatialReference": {
"wkid": 2193,
"latestWkid": 2193
}

 

The flow runs fine and creates the feature but with no geometry. 

 

gis_KIWI4_0-1688524052653.png

Anyone used this connector before, that might have an idea? 

Also there is surprisingly low information on these connectors and the format of the inputs they expect. 

0 Kudos
1 Solution

Accepted Solutions
alex_mapintel
New Contributor III

A quick glance at your json object looks like you have 2 opening brackets "{" and only 1 closing bracket "}".

Id try this format:

 

 

{
  "x": 1436052.3270733608,
  "y": 5002615.309330223,
  "spatialReference": {
    "wkid": 2193,
    "latestWkid": 2193
  }
}

 

 

More details regarding Geometry objects can be found in the Developer Documentation at here 

View solution in original post

3 Replies
alex_mapintel
New Contributor III

A quick glance at your json object looks like you have 2 opening brackets "{" and only 1 closing bracket "}".

Id try this format:

 

 

{
  "x": 1436052.3270733608,
  "y": 5002615.309330223,
  "spatialReference": {
    "wkid": 2193,
    "latestWkid": 2193
  }
}

 

 

More details regarding Geometry objects can be found in the Developer Documentation at here 

gis_KIWI4
Occasional Contributor

Thanks @alex_mapintel , I copied the code incorrectly. It had the brackets. 
It also didn't like the keyword "geometry" in the code. 

What worked for us was the below - 

{
  "x": 1436052.3270733608,
  "y": 5002615.309330223,
  "spatialReference": {
    "wkid": 2193
  }
}



OR 



{
  "x": 170.8504403060537,
  "y": -45.360211429819564,
  "spatialReference": {
    "wkid": 4326
  }
}

 Thanks again. 

 

AnninaRupe1
New Contributor III

Thanks for this solution!

Also, in case anyone else is having trouble with this, just copy/paste the code directly into the "Geometry" bar--not the f(x) bar in the Expression window that appears when you click in the "Geometry" bar.

0 Kudos