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.
@Caitlin_Todd_LCOR , If the attachment is always created only when a feature is created then I would recommend you use something like this:
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.
To piggy-back on this, here is an example of an output of ArcGIS Connector for Query Attachment:
Thanks all for your time and advice on this. I'm trying to implement the suggestions you gave but still having the same issue where the Fetch Updates, Changes, or Deletions isn't recognizing that there are attachments to be found. I'm still troubleshooting when I have time, but for now I'm leaving the photo attachments out of the flow entirely just so I can get the flow running again for staff.
Is this running on Enterprise or Online? Try using Query attachment. and use the dynamic content from the fetch action. I will check if there are anyissues.
This is running on Online. I tried Query but the Fetch action didn't recognize any attachments to be queried. When I try to test the flow it skips right over Query Attachment as it couldn't find anything to query.
This is the raw output from the Fetch action. Even though I tested with a newly created point feature it didn't fetch anything.
So What is your trigger exactly? `When a guardrail note is created`. Is it feature created or Attachment created or something else?
And how are you triggering it? e.g creating a new record ?
The trigger is when a new feature is created in the hosted feature layer. Staff will typically attach a photo at that time as well.