Hi All,
I'm currently trying to create a flow that tracks the updates to an ArcGIS online feature layer. I was wondering if there was a way to extract the Attribute data from the following code so I can reformat it into a more user friendly appearance in an email.
I'm a JSON and Power Automate newbie, so any and all suggestions would be great. Thanks in advance!
{
"layerServerGens": [
{
"id": 0,
"serverGen": 458189
}
],
"transportType": "esriTransportTypeUrl",
"responseType": "esriDataChangesResponseTypeEdits",
"edits": [
{
"id": 0,
"features": {
"adds": [],
"updates": [
{
"geometry": {
"rings": [
[
[
2556265.90578417,
482548.2758253
],
[
2561942.66804101,
482305.347848049
],
[
2562932.3081841,
476869.569885384
],
[
2555554.10480682,
476454.314157847
],
[
2556265.90578417,
482548.2758253
]
]
]
},
"attributes": {
"OBJECTID": 45,
"GlobalID": "F35B148D-1294-4CAC-8203-CA190FE96EF8",
"OutageType": null,
"AlertType": "BW",
"AlertDetails": null,
"ScheduledOutage": null,
"ScheduledServiceRestoration": null,
"AdditionalResources": null,
"Status": "A",
"CustomersAffected": null,
"InternalComments": null,
"OutageDetails": null,
"Division": "SO",
"Submitter_Name": "Austin Test"
}
}
],
"deleteIds": []
}
}
]
}
That worked beautifully! Thank you so much for your help
Here is the high-level flow:
Here are the details. Your data was pasted into a Compose action:
Then we use an expression to select the attributes:
You can copy the expression below:
outputs('Compose_Data')?['edits'][0]['features/updates'][0]['attributes']
To get the ObjectID or any other property we can use the following expressions:
Here are the expressions to get the other properties:
outputs('Compose_Attributes')?['OBJECTID']
outputs('Compose_Attributes')?['GlobalID']
outputs('Compose_Attributes')?['OutageType']
outputs('Compose_Attributes')?['AlertType']
outputs('Compose_Attributes')?['AlertDetails']
outputs('Compose_Attributes')?['ScheduledOutage']
outputs('Compose_Attributes')?['ScheduledServiceRestoration']
outputs('Compose_Attributes')?['AdditionalResources']
outputs('Compose_Attributes')?['Status']
outputs('Compose_Attributes')?['CustomersAffected']
outputs('Compose_Attributes')?['InternalComments']
outputs('Compose_Attributes')?['OutageDetails']
outputs('Compose_Attributes')?['Division']
outputs('Compose_Attributes')?['Submitter_Name']
Sample output after run time:
Hope this helps.
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional