Select to view content in your preferred language

Fetch updates, changes, or deletions failing to fetch photos from AGOL feature service

151
2
3 weeks ago
Caitlin_Todd_LCOR
Regular Contributor

Hello, 

I'm trying to use Power Automate to set up automatic email notifications when a new feature is added to a hosted feature layer on ArcGIS Online.

I'm using the trigger "When a feature is created" and associated action "Fetch updates, changes, or deletions" to attempt to pull in any attributes and/or photos from the newly created feature and organize them into an MS Outlook "Send an email(V2)". I have the attachments being pushed into an array variable then added to the email as an attachment.

I can see the photo attached to the new feature in ArcGIS Online. But the output for Fetch updates, changes, or deletions is returning a null array for the attachments which is causing the action for Append to Array Variable to be skipped entirely. I copied and pasted the output  of the Fetch updates, changes, or deletions below.

    "body": {
        "items": [
            {
                "attributes": {
                    "OBJECTID"2304,
                    "EventRdStatus""Tree - Impassable Road",
                    "HazardType""Tree",
                    "UtilityHazardType"null,
                    "RoadName""test",
                    "BMP"null,
                    "EMP"null,
                    "ClosestAddInts""test",
                    "RoadType"null,
                    "OpenLanes"null,
                    "ETA""test",
                    "ETC""test",
                    "GlobalID""ee50f36a-7b55-4410-a1fa-fbe889514607",
                    "TreeCount"null,
                    "TreeSize""test",
                    "TreeType"null,
                    "MaintZone"null,
                    "Supervisor"null,
                    "LocationNotes""test",
                    "OperationNotes""test",
                    "WERCSID"null,
                    "Response"null,
                    "CreationDate"1758125125262,
                    "Creator""name",
                    "EditDate"1758125125262,
                    "Editor""name",
                    "DateLastSent"null,
                    "Resend"null
                },
                "geometry": {
                    "x"4187066.005184437,
                    "y"898857.0352970393
                },
                "changeType""FeaturesCreated"
            }
        ],
        "deleteIds": [],
        "attachments": []
    }
}
 
I tested the flow with the Google Chrome Devtools to catch any more information and could only find a brief message when the flow was trying to append the photo into the designated array variable.
 
{
"error": {
"code": "AzureResourceManagerRequestFailed",
"message": "Request to Azure Resource Manager failed with error: '{\"error\":{\"code\":\"ActionRepetitionNotFound\",\"message\":\"The specified repetition '000000-000000-000000-000000' of workflow action 'Append_updated_attachments_to_array' is not found.\"}}'."
}
}
 
Has anyone else come across this kind of issue in Power Automate's ArcGIS Online actions? Specifically the Fetch Updates, Changes, or Deletions? Is there any other tool to use to troubleshoot the issue?
 
Thanks, 
Caitlin T
Lane County GIS
0 Kudos
2 Replies
AkshayHarshe
Esri Contributor

@Caitlin_Todd_LCOR , If the attachment is always created only when a feature is created then I would recommend you use something like this: 

AkshayHarshe_0-1758139037759.png

Else, Maybe another trigger like `When attachment is created` is more appropriate.

That said, I will look into enhancing this option to Fetch updates, changes, and deletions action.

Thanks,
Akshay Harshe
0 Kudos
CalvinHarmin
Frequent Contributor

To piggy-back on this, here is an example of an output of ArcGIS Connector for Query Attachment:

 

{
    "statusCode"200,
    "headers": {
        "ETag""W/\"143-SEyQLGQQvSDupHamIqbh1v32DBI\"",
        "Vary""Origin,Accept-Encoding,Authorization,X-Esri-Authorization",
        "arcgis_connector_version""ArcGIS 2025.2.0 2025.06.10 1749573664471 361de8",
        "X-Powered-By""Express",
        "x-ms-environment-id""<redacted>",
        "x-ms-tenant-id""<redacted>",
        "x-ms-dlp-re""-|-",
        "x-ms-dlp-gu""-|-",
        "x-ms-dlp-ef""-|-/-|-|-",
        "Timing-Allow-Origin""*",
        "x-ms-apihub-cached-response""false",
        "x-ms-apihub-obo""false",
        "Date""Wed, 20 Aug 2025 22:47:34 GMT",
        "Content-Length""323",
        "Content-Type""application/json; charset=utf-8"
    },
    "body": [
        {
            "id"133,
            "globalId""<redacted>",
            "name""IMG_2351.JPG",
            "contentType""image/jpeg",
            "size"4568873,
            "keywords""attach_images",
            "url""https://services3.arcgis.com/<redacted>/FeatureServer/0/567/attachments/133"
        }
    ]
}

The body value is an array of attachment attributes (not the attachment itself). If no attachments are found for the specified objectid, the array is empty: []
 
As @AkshayHarshe pointed out, you would then use ArcGIS Connector Get attachment from URL to get the actual raw attachment file data for each attachment via the "url" value from each attachment you're iterating over from the Query attachment body.