Select to view content in your preferred language

Survey123 Create Report Action Failing

3675
19
Jump to solution
06-19-2023 04:42 AM
RobertAnderson3
MVP Regular Contributor

I've set up a bunch of Power Automate flows with the Create Report function and it's a beautiful tool for many workflows we have.

However, I am finding on an unfortunately regular basis that the report isn't returning any results?

The action Create Report itself marks as "Successful" but then the "Upload File from URL" action fails because "A value must be provided for source path" so when I look further into the "Create Report" I find it has returned an error, a few different ones 'Internal Server side error' (I think this was Esri server errors mid last week) or 'Error assembling data' or 'Error querying data'

But when I run them again, without making any changes to the data or webhook, they work without an issue.

I'm curious if there's something I'm missing (other than a try-catch to run it again if the output is an error) or why the Create Report action marks as successful when it has in fact failed.

Has anyone else been having similar issues?

19 Replies
abureaux
MVP Frequent Contributor

I assume you are Enterprise, but if you are AGO, it is slightly different (and easier, since you can skip a step). Also, if you are Enterprise, but you have an old connection (like I did), you will not see any of the new options unless you update your old connector (which is easy, but annoying).

If you are Enterprise and are making a connection to Power Automate for the first time, it's relatively straight forward:

  1. Follow instructions here. Esri hasn't updated the graphics in a while, but it is still valid.
  2. After you add that connection and test connections successfully, you are done! You will see all the new options when you create a flow.
    abureaux_0-1699979580585.png

Beyond that, it is really up to you for what you want  to do. Personally, I upload all generated reports to SharePoint for storage, then I use those files in all subsequent processes (mainly to avoid issues pulling a report at a later time).

Is there a specific thing that isn't working or place you are stuck?

0 Kudos
DanLissick
Occasional Contributor

The flow suggested in the attachment seems to be the solution I am looking for. Though in the image I don't understand how "reportSuccess" or  "Set reportError" variables are created.

 

0 Kudos
abureaux
MVP Frequent Contributor

Ahh. So it shouldn't be necessary to do this inside an Apply to Each Do Until. I only figured out my connection was outdated earlier this year, and have since updated that and modernized all my flows. As such, I've been using the new workflow for most of the last year, and haven't run into any issues yet.

Here is my (very simplified) process:

abureaux_1-1699988229732.png

When adding the Value to your Variable, you need to select status of the first result file. If you select the other "status", your Set Variable step will be tossed into an apply to each. That is because Esri's Create Report step is a self-contained Do Until. Esri set up all of the "... of the first result file" variables specifically for situations like this.

abureaux_2-1699988269954.png

NOTE: I suppose you could probably skip over the Variable entirely if you really wanted. I just like variables.

0 Kudos
DanLissick
Occasional Contributor

Thank you!

0 Kudos
RobertAnderson3
MVP Regular Contributor

Did you end up getting it all sorted @DanLissick ?

And @abureaux have we heard anything more about the token timeout for the Survey123 report functions yet? I still have my 14 day reminder to sign back in lol

0 Kudos
DanLissick
Occasional Contributor

I believe I have. The update to Power Automate in the early summer seemed been the issue. I too have a reminder to refresh Survey123 under Connections. Though when starting to use the new designer instead of classic I noticed my flows in the new designer had broken connections for each Survey123 step even though I was updating Surveying in the Connections location. It has been only a few days but I hope that was my main issue.

RobertAnderson3
MVP Regular Contributor

Good to hear! Yeah an update earlier in the year broke surveys that were created from a template prior to then, surveys kept working but if you wanted to make changes things went awry.

0 Kudos
abureaux
MVP Frequent Contributor

Nope 😞

We have to update our employee list CSV weekly anyways, so I added "refresh Power Automate connection" to my Monday Morning tasks for now.

RobertAnderson3
MVP Regular Contributor

Darn, yeah it's on my calendar to refresh when needed. The CSVs I have I update as I get the info. (That said, I'm still waiting for them to fix the issue with CSVs not refreshing if you use a URL scheme to open the survey too)

0 Kudos
abureaux
MVP Frequent Contributor

"I'm still waiting for them to fix the issue with CSVs not refreshing if you use a URL scheme to open the survey too"

I can't express in words how much I need this... (Same with the survey itself not updating when launched via a URL)