Select to view content in your preferred language

Power Automate Trigger Issue

4287
27
05-11-2022 05:26 AM
DarraghOSullivan
Frequent Contributor

Hi all,

I've had 4 Power Automates working with Survey123 for a long time, but I just noticed that they have failed in the last few days. It's a problem with the trigger, where I get the message:

The 'Location' header is missing in the response of subscribe request.

Has there been any change within Survey123 that would be causing this? The survey responses are working fine with data going into the Feature service etc. Surveys created in Connect, submitted online, with location of survey response fed via url parameters into the Survey. 

Thanks, Darragh

27 Replies
AdminPDM
New Contributor

I have refreshed the login credentials - it seemed to kill some of the other Power Automates that were still working though for other surveys.

After completely rebuilding the power automates they appear to be working (all but 1 image export - I can live without that one for the short-term).

Whenever I seem to "Edit" a power automate flow it throws an error on the initial trigger saying it cannot read the value for the survey123 selected. It then won't let me successfully check anything else in the flow as it doesn't find the initial survey. Is this something you have encountered? The only way to resolve this has been to delete the trigger and re-establish it which of course removes any dynamic links in the flow. Currently I'm at about a 2hr turn around to do this only to find out it is still failing with no real reason why.

0 Kudos
abureaux
MVP Frequent Contributor

That is not something I have seen before, and definitely isn't working as intended.

I have seen it where the Initial Trigger changes the survey you select from the drop down from the human-friendly "Survey Name" to the back-end "Item ID". This happens when (and if) the Connection's login credentials time-out. Depending on which connection you are using, this happens every two weeks. If you go to your connections, refresh the login, and then go back into the survey to look at the Initial Trigger, it will automatically revert back to the human-friendly "Survey Name", which indicates the login information is valid.

Now... there is currently a bug, where the credentials for some specific operations are expiring every ~2 hours with Esri's built in ArcGIS Connectors. That is a known bug, and Esri is (theoretically) working on a fix. (this may be what you are running into... but it shouldn't affect "When a survey is submitted")

Are you using a Custom Connection, or the built-in Esri ArcGIS Connection? Also, AGO or Enterprise?

0 Kudos
Jaivik_P
Occasional Contributor

We are also facing the same issue with Power Automate flows. They were working fine since a year or so and suddenly stopped working (does not trigger 'When a survey response is submitted')!

The issue resolved when we re-established a connection reference. (Simply clicked on overflow menu (...) next to the trigger and clicked on a +New connection reference > then sign in to the account)

I also have noticed the similar behavior that @abureaux mentioned. The trigger would change back to human-friendly 'Survey-Name' after a new connection reference is set, which was before showing as an 'ItemID' of the survey. 

If this connection time-out going to happen every 2-weeks or so, is there an automated way to re-establish/refresh that connection? Going in the backend and manually renew connection is not an ideal situation I guess!

0 Kudos
abureaux
MVP Frequent Contributor

No. There is no a way to automate refreshing connections.

I (somewhat ironically) have a Power Automate flow and SP list set up to track Connections. I refresh connections once per week, and record that in SP. Failure to record the refresh results in notifications after 8 days. That way, my connections are never out of date and processes aren't affected.

How I refresh Connections is as follows:

abureaux_0-1731021014785.png

I'm in Power Automate almost every day and this action is barley a few seconds, so it isn't terribly disruptive to my workflows.

Making a new connection works as well, but then you end up with tons of dead and dying connections on this page (Hence why my primary Connection that hundreds of flows are based off has a "3" in its name! When I first started in Power Automate, I remade several connections before I realized what was happening).

Jaivik_P
Occasional Contributor

You are right @abureaux, Creating New connection reference (although it resolved the issue), generates several extra connection references. 

Instead, the easy way around is to setup a reminder for every 2-week to check the Connection itself - whether it needs a re-connect. 

0 Kudos
TomFlahive1
Emerging Contributor

Yes, I've had a weekly Monday morning reminder myself to refresh the Survey123 connection in Power Automate for some time now.  I do it weekly in case I forget a week.  It only takes a minute.

When I was at the Developer Summit this year, I talked to one of the Esri developers about this.  My recollection it that he said the Survey123 actions in Power Automate were going to be replaced with ArcGIS actions (the ones with orange icons) that can also handle Survey123.  Apparently the Survey123 specific actions use an older approach/technology that has certain drawbacks, such as this need to refresh the connection manually.  I thought that was going to happen this year, but I haven't seen it yet.  We'll see.

0 Kudos
abureaux
MVP Frequent Contributor

It actually has happened already! Kind of. The two integrated Esri actions (pictured below) work for S123. They didn't really announce it, but you no longer need to make a Custom Connection for S123 (for either AGO or Enterprise). EDIT: In case it wasn't implied, the Custom Connectors still work for S123, and are my primary method of connection atm. You don't need to change all your flows, you just have more options now.

Now, I already use a Custom Connector for >100 flows... I'm not swapping that easily. Also, there is a bug with the new Connectors where, for some operations, they are timing out every 1-2 hours...

abureaux_0-1731084043540.png

 

0 Kudos
TomFlahive1
Emerging Contributor

Oh, interesting.  I'll have to check that out now.  But I can see your hesitation having over 100 workflows!

0 Kudos