Select to view content in your preferred language

Issue: Cannot create multiple flows with "When a Survey response is submitted" trigger on a single Survey

84
0
yesterday
AkshayHarshe
Esri Regular Contributor
0 0 84

I am creating this post to ensure everyone stays informed about the issue we discovered with the "When a survey response is submitted" trigger. Please note that this is still under investigation so there could be discrepancies or updates to the following information.

This issue affects All connectors: ArcGIS, ArcGIS Enterprise, Survey 123

When we create a flow using the "When a survey response is submitted" trigger in Power Automate, it generates a webhook in the Survey123 App. Currently, the webhook is created with the default name MS-FLOW, whereas previously it was named MicrosoftPowerAutomate-[flowId]. When multiple flows are created for the same survey using this trigger in Power Automate, it fails to assigns unique names; instead, it replaces the existing webhook in the Survey123 app with the same MS-FLOW name.

After conducting some tests, we have identified the following findings. We know the this behavior is due to a recent change by Microsoft, as they are transitioning their URLs from "logic.azure.com" to a new architecture using "api.powerapps.com" where the URL construction is different than before causing internal failures.  For reference, please see: Troubleshoot common issues with triggers - Power Automate | Microsoft Learn. 

Unfortunately, we did not anticipate any issues with this change when we audited our code and it expressed itself in the Survey 123 app. We are working with Survey 123 team to investigate and resolve with best possible solution and as soon as possible. We apologize for any inconvenience. Please see following details and workaround. 

Who is affected?

Firstly, we think that Microsoft is still rolling this update and not everyone will experience this issue.

  1. If you are creating multiple Power Automate flows on a single survey with `When a survey response is submitted` trigger.
  2. If you have multiple existing Power Automate flows with this trigger and they not working or if you are trying to update or reauthenticate them. (Still investigating the impact please be mindful when updating your flows with this trigger)
  3. You are updating an existing flow with `When a survey response is submitted` trigger.
  4. You are turning on an older flow on a survey which has other associated flows with the trigger above.

Who is not affected?

  1. You are creating a your first flow with `When a survey response is submitted` trigger using any the ArcGIS connector.
  2. If you are not creating multiple flows on the same survey using the trigger in Power Automate.

Workaround

If you wish to create multiple flows on a single survey using `When a survey response is submitted` trigger then 

  1. Create Flow 1 in Power automate and save it. This should create a webhook named MS-FLOW in the survey 123 app --> survey -->settings -->webhooks. Make sure to build the entire flow and save it before continuing to the next step.
  2. Rename the webhook under survey settings to something meaningful. If renaming produces an error try turning the flow off then on. This will delete and recreate the webhook in the Survey. 
  3.  Repeat steps 1 & 2 to create additional flows
  4. Test if all the flows are triggering.
Turning on older flows on a Survey that has other active flows

Please be mindful when turning on an older flows on survey that has other active flows as it can replace an existing webhook on the survey if it is named "MS-FLOW" 

  1. Check your survey if it has a webhook called "MS-FLOW"
  2. Rename this webhook and test if it works.
  3. Turn on the older flow. This might create a webhook named "MS-FLOW" on the survey selected 
  4. Rename this webhook.
  5. Test all the associated flows on the survey work.

Hope this helps.

Contributors
About the Author
I am a GIS professional working with ESRI since 2013. I have a passion for location-enabled services how it is important in today's analytics of the data-driven world. I am privileged to work as a Product Engineer on the ArcGIS Insights team where I get to materialize my passion and build a product that is driven by cutting-edge technology in this industry. When I am not doing GIS you will mostly find me taking photos and talking about photography.