Select to view content in your preferred language

Power Automate Trigger Issue

3263
17
05-11-2022 05:26 AM
DarraghOSullivan
Occasional 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

17 Replies
RobertAnderson3
MVP Regular Contributor

It had no previous runs in the history, I thought it had months ago when this project first came up but none were in there. When I looked into it saying 'there might be an issue' it did show me the Location header error message.

I re-made it again (and made sure to update my survey on my device to fix the webhook link) and it worked though.

0 Kudos
SamuelFirmenich
New Contributor II

I found that if you turn the flow on and off in Power Automate, the web hook will reappear in the Survey123 settings. For some reason, the web hook was not there when the flow was on previously. I believe it was related to the connection (credentials) being broken.

Just to be sure, check the "My connections" for the Survey123 trigger step and make sure you're connected. Also, update the form or reopen the form in the web after you save and the changes are made.

0 Kudos
studebakers_Boulder
New Contributor III

I too just discovered that the same error was preventing my previously successful flows to suddenly fail. I checked all connections in PA and webhooks in Survey123 - all were good. No changes were made on either the PA or Esri enterprise side which might have caused this issue. To rectify, I had to 'Save As' to create a new flow - no other changes were made to the 'new' flow. 

Any possible explanations from the Esri side as to why this might be happening?

0 Kudos
RickeyFight
MVP Regular Contributor

I ran into this issue on 1/27/2023. I am not sure why it is failing. I have tried saving as and creating a new flow. Both ways dont work. 

0 Kudos
abureaux
MVP Regular Contributor

Okay. I just had this happen to me!

I tried looking at a bunch of different things, and I can safely say that I have no clue why they stopped working. For me, it was July 11, 2023.

  1. I tried the obvious things like turn it off and back on. No luck.
  2. I tried making a new flow, and bam. New flow magically worked.
  3. I compared the old flow and the new flow, and they were identical with the exception that the new flow triggered and the old flow didn't... or so I thought
  4. I checked again the following day, and the old flow began working properly after the new flow was turned on (so now I have two working webhooks/flows).
  5. This got me thinking... I went to another flow that wasn't working, found a previously successful flow run, and hit "Resubmit". The flow ran as it should, and this magically "jump started" the trigger to act the way it should, thus fixing my flow.
    abureaux_0-1689807113234.png

Now, I am going to have to make a flow that queries the Portal to compare flow runs against database entries to ensure this doesn't happen again...

Esri doesn't seem to have any information on this issue (at this time). Hard to say if it's an Esri or PA issue.

0 Kudos
abureaux
MVP Regular Contributor

So I've been noticing this more. Still no clue why it's happening.

But I have found that the issue is now happening when I resave a flow with the "When a survey response is submitted" step. After saving, the flow becomes none responsive. But it wakes up again after I force through a previous submission...

0 Kudos
studebakers_Boulder
New Contributor III

Regardless of whether the issue is with Esri or PA it makes using the two together unreliable - I can't continue using them without some sort of explanation or understanding 😞 

0 Kudos
TomFlahive1
New Contributor II

I don't know if this is a solution to the original problem described, but it is related to a Power Automate trigger not working with a Survey123 App.  Since I came across this post while looking for a solution, I thought I would share. 

We had created a Survey123 App and wanted to use Power Automate to notify us when new records were added.  When we originally created the Survey123 app, Survey123 set up a base feature layer (1) as well as two views on that layer (2, 3):

TomFlahive1_0-1695946883404.png

We originally created our trigger to point to the base layer (1).  But the trigger was not firing when we added new records using the Survey123 form.  After working with an Esri support analyst, he determined that it was the _form view (2) that was actually getting called when a new records was added to the survey.  So we switched the trigger to point to that "_form" view (2) instead of the base layer (1).  We had to make one more tweak to get this to work.  Although the base layer had the "Keep track of changes to the data" setting checked, the _form view did not.  So we check that setting on the view as well:

TomFlahive1_1-1695946883407.png

Once we did that, the trigger began to fire when a new record was added.

Here is what the start of the workflow looks like:

TomFlahive1_0-1695947237466.png

 

0 Kudos