Does anyone know if the ability to generate Surevey123 Feature Reports using Power Automate has been fixed? I've used the work arounds described in previous posts but some of my surveys are getting a bit complicated to continue to do that.
Hi @Bryan_Wade
Thanks for your reply! I will log your comment in our internal repo.
Thanks,
Ruth
It's not so much that it doesn't work with this version of Survey123, but rather Integromat doesn't currently work with Enterprise 10.9. If you are on 10.8.1 or earlier, you are fine.
As for Power Automate, here are the general steps:
*Corrected a couple spelling errors*
*Edit 2. Forgot some JSON*
Try out Survey123 Create Report action in Microsoft Power Automate (Preview)
There is a new Create Report action you can insert into your workflow directly.
Alison
Currently, Survey123 does not support generating report using power automate. I encourage you to contact Esri Support, and our Support team will assign an official bug number for your records. This number can be used to search for and subscribe to the bug on the Esri Support site. If the issue is reported by other customers it will be attached to the same bug report, which helps us assess the impact of the issue and prioritize it accordingly.
Since you mentioned that you are using custom power automate connector for report generating, this developer documentation of the Report REST API might be helpful: https://developers.arcgis.com/survey123/api-reference/rest/report/. Also, if it is possible could you please let us know what is the issue you encountered with your workflow?
Ruth,
I wasn't so much an issue just a pain to do the work around. My organization currently doesn't allow us to use integromat and I would like to generate a feature report that then gets emailed to s supervisor when a particular survey is submitted. Mostly just hoping that the option to generate a report using power automate will be available soon
I can confirm that you can generate a Survey123 Feature Report via Power Automate flows. I am using it for all of our automations right now (mainly because Integromat isn't working in 10.9).
I would be curious to know how you are doing that as there isn't an option to generate a feature report in power automate. I know there are custom options 1 of which I am currently using but it requires consistent monitoring to ensure functionality. Integromat though allows me to create the report using my report template from Survey123. You are the first person that I've heard from about Integromat not working with the newest survey123 version.
That is what I currently do and want to stop doing. Also, I am using AGOL and not Enterprise. But I appreciate the replies. I'll just keep doing what we are doing until I can get approval for integromat or Esri decides to provide support in power automate.
Hi Abureaux
Looking at step 12 part 3. At the moment its coming up with the below. Is this correct? or is a txt file i cant get access to?
Thanks for posting that. I recreated that flow and everything works - except if the report template contains a geopoint type question, then it fails with:
["An error occurred when rendering by the report engine. Failed to print map for `$map_geopoint`. waiting for function failed: timeout 180000ms exceeded"]
If I remove the geopoint question from the MS Word feature report template, then it works fine and generates the report from the Flow API request. When the geopoint question is included, the report generates normally without error from the Survey123 web site, but fails if called from the Flow API.
I have already opened a support request with ESRI on this issue, but so far we have been unable to resolve this. The query works and everything is returned, but it seems like it cannot access the map used for printing the geopoint in the MS Word feature template.
We have tried many things to to resolve this, including adding the webmapItemId and mapScale parameters and trying different formatting of the request within Flow and also using Postman, but nothing seems to work when a geopoint question is included.
Just wondering if you or anyone else has tried including a geopoint question in the MS Word feature report and then using the API request from Flow to generate the report. Has anyone successfully done this, had similar issues or found a way to resolve this problem? I'm testing with a report template that is very basic - one question and one geopoint... no repeats or anything.
Right. That... I forgot about that. That is a bug.
I noticed this a while ago as well. Took me a bit to figure out that the geopoint was the issue when handled by Power Automate since the template worked fine when printed through the Portal and this feature used to be supported in Power Automate.
A recent(ish) update from Esri broke something, so geopoint questions seem to cause the error you described above. I removed my geopoint questions a while back to get around this bug. I have been meaning to contact Esri Support to report the issue, but it slipped my mind.
If you are using Portal 10.9 (like me), there aren't many other options. If you are still on 10.8.1 or earlier, you can try Integromat. It may still work with geopoint questions. I cant really test though as it doesn't work at all in 10.9 ><
Sorry I couldn't be more help on this one. Hopefully they can identify the issue and fix it. I miss geopoints...
Thanks for that reply. I'm testing this process using AGOL instead of Portal, but it sounds like exactly the same issue regardless. You indicated this process used to work fairly recently - I'm guessing it broke sometime around September 16, the last major AGOL update by ESRI - does that sound about right?
If so, maybe we can pinpoint the issue to something that occurred in that last ESRI update. I'm working with tech support and will post updates to the issue as received.
I believe it was before that update. Looking back through my records, there was an update on July 29, 2021 that caused me a lot of grief. It was sometime after that when I started removing the geocode questions...
If I were to go off of my Word document's time tags, I have a template with a geocode question on August 19, and a subsequent template without the geocode question that same day. So, looks like I noticed the issue in mid August.
Thanks abureaux. Can you please post the results of your findings with ESRI Support on the Edit & resend issue? I'm sure I'll be running into that too at some point. ESRI Support has diagnosed the issue with the geopoint question and provided a workaround. It has been recorded as a bug, and I have escalated it.#BUG-000143518 Trying to run createReport Request using a token from the generateToken Request Fails
The issue is with the token. Using the generateToken API request fails to provide a valid token to access the map required for the createReport function, it only works using the token that was included with the survey submission.
So the workaround is to use the token that's included with the submitted survey, not the one created from the generateToken API call. Instead, use the value of Portal Info Token that's included with the survey submission. It works, (it will create the map if a geopoint question is included in the template) however there are some caveats that make it less than ideal. This token expires in 15 minutes, so it's not going to work if your automated report generation is on a schedule longer than that, and if the process fails the token will not be valid for resubmitting. Also, since the token is included as part of the survey submission, it's using the submitters permissions to access and generate the report, meaning that all submitters MUST be included in a group that can access and view the surveys (Share Results in the web app), and the history of the report generation will only be available from the Survey123 web app when logged in as that user.
In our environment this workaround is not really feasible. Hopefully the escalated request to resolve this bug will be implemented quickly.
@abureaux - Thanks for the workflow. I am trying to send out a report when a certain field is updated in a feature service(Survey123 fs). The feature service when edited does trigger the flow, but I get an error 'cannot read property 'username' of undefined' when it gets to step 7 in your workflow. The survey isn't shared to everyone but the flow user has access to the survey. Is this workflow only possible when survey123 is triggered? Any thoughts?
Thanks to James Tedrick at ESRI - the solution to the issue we were having generating reports using the Create Feature Report API in Microsoft Power Power Automate has been resolved. The issue was a bit difficult to diagnose, since everything worked as expected except when a geopoint question was included in the report template, then it could not render the map on the report and the process would timeout.
The solution is to make sure the generateToken API request in the flow includes the value referer=https://survey123.arcgis.com
I just finished a form that requires a map, so this is very good news indeed!
However, I feel like something may have changed behind the scenes with either Esri or Power Automate? When I went to check my set-up, I already had the referer set (also visible in my post above):
I did a test with my automation as-is, and the print (including a map) didn't time out! I'm very excited to have this capability again.
Hello dear abureaux , first of all, we want to thank you for the above solution, we are able to use and generate report.
We are facing some issue with the GeoPoint, when we include GeoPoint, we are not able to generate report.
Is there anything we need to do here ?
or any where else, we need to do any modifications, Please advise, thank you
Yes. I believe I know what the issue is. There is a mistake in the above process that can result in intermittent issues printing geopoint questions through PowerAutomate. I have been meaning to make a new post with the updated process. I should have time later today!
This post has given me a lot of trouble! But I finally got it done. Please go here for the updated guide: https://community.esri.com/t5/arcgis-survey123-questions/guide-to-generate-feature-reports-in-power/td-p/1165409
Your specific issue is likely going to be solved with what's in "Part 4"
Alison,
If I want to send that report in an email as part of the flow where would I put that in as part of my flow? Below is an image of how I inserted it but when I tested it I didn't get an email attachment.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.