Power automate fetch updates is not creating a valid input?

2048
15
08-31-2023 07:35 AM
MonikaWheat88
New Contributor III

Okay so I am trying hard to understand why some of my flows are working and others are not. I have a few flows that I am trying to post a message in teams for PM's to know when data is being collected. 

this first image of my workflow is posting correctly

MonikaWheat88_0-1693491641948.png

this second flow is not working - like will not collect or get a trigger

MonikaWheat88_1-1693492195103.png

and finally this next one give an error saying The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@outputs('Fetch_updates,_changes,_or_deletions_from_feature_layer')?['body/items']' is of type 'Null'. The result must be a valid array.

MonikaWheat88_2-1693492496134.png

any thoughts? 

 

15 Replies
SarahRijneke
Occasional Contributor

I'm also struggling to understand why some of my flows work and then stop working out of no where. My flow should trigger anytime a change is made to a feature service but I've noticed that it doesn't always run when an update is made. In my example below, someone added a bunch of new features to the assignments feature service on Aug. 30th but the flow didn't trigger at all that day. 

SarahRijneke_0-1693573951736.pngSarahRijneke_1-1693573965504.pngSarahRijneke_2-1693573996097.png

 

LaraJuliussonUSFS
New Contributor II

I am having the same issue with intermittent success of the Power Automate ArcGIS connector.  I am running the same trigger and action as shown above and it works much of the time, but I sometimes receive the error The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@outputs('Fetch_updates,_changes,_or_deletions_from_feature_layer')?['body/items']' is of type 'Null'. The result must be a valid array.

ESRI, can you help please!?

NataliyaLys
Occasional Contributor II

I'm experiencing a similar issue. I have a number of flows set up in Power Automate. The flows are listening for feature updates, and when updates are made (and conditions are met) an email get sent and email status is updated. 

However, I have been noticing that the flows not always work as expected. I can see that flow is being triggered, but the 'fetch updates' output is empty? 

I was told that there is a bug, it doesn't apper to capture the first update that is made. 

But in this specific case i have issue with subsequent updates just not being fetched randomly. At least I don't see any patterns. I also openned a ticket with ESRI to see if someone can assist. 

Thank you,

Nataliya

 

 

NataliyaLys_0-1696601967773.png

 

ZacharyHart
Occasional Contributor III

@NataliyaLys @LaraJuliussonUSFS 

I'm having the exact same issue as well. The flow as built fresh today, working fine, and then suddenly started failing without warning. 

0 Kudos
ZacharyHart
Occasional Contributor III

@MonikaWheat88  Did you ever figure this out? I have spent a while diagnosing this here at the Esri forums as well as MS PowerAutomate forums. I'm not saying this your exact problem, but here's an observation I had. I had a flow working perfectly fine, I hadn't modified save for a few things in the message being put into the Teams channel. 

The error is misleading (well at least in this case) as it lead me to believe that the input from the Fetch Updates step based on the same error you received:

 

 

The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@{outputs('Fetch_updates,_changes,_or_deletions_from_feature_layer')?['body/items']}@{body('Fetch_updates,_changes,_or_deletions_from_feature_layer')}' is of type 'String'. The result must be a valid array.

 

 

So I went back to my Team channel and looked for the last valid response to make it through. I then attempted to reformat the message output in PA and then the flow suddenly started working again. I don't have an exact before and after but I cleaned some things up and added spaces between each insert parameter in the message. I also didn't change out any of the parameters, like i kept the same editor tracking fields I wanted to see in the message. 

This is a complete mystery to me, and since looking at your screen shots, it appears what I have discovered may not help you at all. But there are numerous, unsolved posts about this!

This was a false positive. It now appears that there is no discernable correlation between success & failure. 

@SarahRijneke I reviewed your post as well; i'm trying  a mix of edits/updates: add new text to string field, modify text in a string field, change the attributed on a coded domain field etc. No pattern has arisen yet.

EDIT!: The same flow which I modified and had working fine immediately failed the second time using the exact same test (change to a record). 

@AnthonyLatiniHave you seen this thread yet?

0 Kudos
AnthonyLatini
Esri Contributor

@ZacharyHart @MonikaWheat88 @NataliyaLys @LaraJuliussonUSFS @SarahRijneke 
Hello to everyone in this thread! 😀

I am catching up on this and wanted to provide feedback. At the moment, there is a known issue with the Fetch updates, changes, or deletions action. In the issue, the changes that are captured can come back as [ ]. Meaning, there weren't any changes captured even though there might have been a new record created, updated, deleted. 

Both @PavelJ and I have been attempting to track this issue down and are working with the ArcGIS Online team to determine the best way to reliably reproduce the issue and the determine a fix. This issue does not appear to be stemming from Power Automate or the ArcGIS Connector inside of Power Automate, but rather from the layers themselves. 

In my experience, when testing this issue, I was able to reliably reproduce it on one feature layer, but then not reproduce it in another. 

As a note, everyone appears to have their flows set up properly and you are working through it in the correct manner. 

Please sit tight with us as we work to resolve this issue. Thank you all for your patience! 

ssweat
by
New Contributor II

Hi @AnthonyLatini ,

I am having a similar issue. Are there any updates for the Fetch updates feature in Power Automate?

 

Thanks!

0 Kudos
AnthonyLatini
Esri Contributor

@ssweat - Hi there! As mentioned in previous posts, we are working to resolve this issue. At the moment, there isn't an ETA, however, this is the top priority on the team to resolve issues surrounding Fetch Updates. 

Thank you for your patience on this issue! 

NataliyaLys
Occasional Contributor II

@AnthonyLatini 

I don't want to get too excited, but I noticed that starting November 30th, around 11am - 12 pm ALL my flows started running successfully. 

I believe that there has been update to AGO, is the last day or so. Does that have anything to do with this change? 

NataliyaLys_0-1701451172520.png

And here is a screen shot from before Nov 30 (11am-12pm). 

NataliyaLys_1-1701451346701.png

 

Thank you,

Nataliya

 

0 Kudos