Select to view content in your preferred language

Unable to access attachments from AGOL hosted feature layer

2923
11
05-11-2023 09:44 AM
GIS_Admin
Occasional Contributor

I am trying to author a flow where when a record is added to an AGOL hosted feature layer, I pull the attribute information and the attachment (photo) and email them to someone. Right now I use the When a record is created in a feature layer trigger then use the Fetch updates, changes, or deletions from feature layer action. This grabs all the attribute information, but will not return any attachments. The response shows an empty array:

FetchResult.png

When I use the REST endpoint of the service, I can see the attachment:

RestResult.png

I tried using the Get attachment action and it's greyed out since there's no data getting passed: 

GetAttachment.png

Lastly, I tried the Get data from feature layer action and still get nothing for attachments.

Am I missing something here? 

 

 

11 Replies
TimLohnes1
Frequent Contributor

Good find. So close, then denied. So seems like this doesn't work. Hoping this can get fixed, ESRI, or more specific documentation.

 

0 Kudos
ArthurSmith2
Emerging Contributor

We ran into this same issue and were never able to figure out how to query attachments from either an ArcGIS when a feature updated or created trigger.  Hopefully Esri considers this for an enhancement to work similar to the Survey123 triggers which make it easy to get attachments in Power Automate.

Our workaround was inspired by @jcarlson's post in this thread to use an http call to AGOL REST service to get the list of attachments for the record, then get the attachments themselves.  This was fairly easy to implement:

PA_Get_Attachments_from_Record_Update_EXAMPLE.jpg

0 Kudos