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:
When I use the REST endpoint of the service, I can see the attachment:
I tried using the Get attachment action and it's greyed out since there's no data getting passed:
Lastly, I tried the Get data from feature layer action and still get nothing for attachments.
Am I missing something here?
Good find. So close, then denied. So seems like this doesn't work. Hoping this can get fixed, ESRI, or more specific documentation.
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: