Select to view content in your preferred language

Guide to Generate Feature Reports in Power Automate (Enterprise and AGO)

7628
31
Jump to solution
04-18-2022 01:41 PM
abureaux
MVP Frequent Contributor

> Go to the updated guide! <

This post describes the old manual method of generating Feature Report within Power Automate. Technically, this method does still work, but it is a LOT of extra work. There is a much easier method now! Check out my post above for more details.


I have tried to post this several times over the last few days, and it has kept failing. As such, I have opted to go with an attachment. My apologies for the extra download and mediocre formatting!

This is a guide for users new to using S123 in the Power Automate (PA) platform, and is a repost from an earlier post I made. That thread is kind of hard to follow now because I didn't start it, and this is also an updated flow to fix a bug with geopoint questions not working before. The guide fully details how to generate a feature report for S123 using PA.

Please let me know if you have any questions!

Environment:

ArcGIS Enterprise.

AGO has a new built-in connector. Just use that rather than trying a custom approach. 

Requirements:

  • Power Automate Premium workspace.
  • Admin access to your Portal.

Scale:

This guide is for a simple one-step flow. I do not recommend this for large-scale deployments as it does not have adequate error handling capabilities. I use a two-step process which I can detail later. Basically, I dump the initial response from S123 into SharePoint and then process that. This will give you all the basics though!

Versions:

  • v2 - Updated step for the Do Until loop
31 Replies
abureaux
MVP Frequent Contributor

Out of curiosity, is there a reason you can use Editors can only see their own features (requires tracking)? I'm not too sure how that interacts with a Public Survey though. 

abureaux_0-1651004021639.png

 

This could be a limitation of the flow, but Esri support may be able to shed some light on that.

0 Kudos
ISP_graynic
Frequent Contributor

I think the problem there is technically anyone who anonymously fill the survey out is out is seen as 1 user, so therefore it's their "own" features. Meaning anyone who submits anonymously can see anyone else who's anonymously submitted data which is what we are trying to avoid. That's why we had to change it to the last setting. I also have an email to an ESRI contact to see if they have any ideas. 

0 Kudos
abureaux
MVP Frequent Contributor

Darn. That's what I was afraid of. I was hoping that each submission would be a different "user".

Hopefully Esri has a suggestion that will work for this. Please respond back if you find a work around! Sorry I couldn't be of more help.

0 Kudos
ISP_graynic
Frequent Contributor

I think I may have figured a workaround. In Step 7 "Add 3 Set Variable steps" I changed the featureLayerUrl to the the service URL of a view layer that's not shared publicly out instead of the dynamic value from the Parse JSON. It seems like adding a new entry to the public layer via the survey still triggers the flow but the actual report is generated off a view layer. 

OlivierPontbriand_Pare
New Contributor

Hi! One quick question. 

I'm connected to S123 through AGOL and I'm not sure what's supposed to go instead of NAME (the blacked out section)  in the HTTP blocks. 

https://survey123.arcgis.com/api/featureReport/jobs/JOBID?portalUrl=https://NAME.com/portal&token=TOKEN

I've tried a few things and nothing seems to work.

thanks a lot!

0 Kudos
abureaux
MVP Frequent Contributor

Unfortunately I don't have explicit steps for completing this in AGO. As all our corporate content is in Enterprise, it's very rare I look at AGO workflows.

If anyone has a workflow for AGO, I would be more than happy to update my initial post to include steps for both environments so that everyone can benefit! If I get lucky with some free time, I'll try to put something together, but not sure when that will be though.

0 Kudos
BenGultch1
Occasional Contributor

Have you tried omitting the portal section?

So something like https://survey123.arcgis.com/api/featureReport/jobs/JOBID &token=TOKEN

0 Kudos
JessicaBennett
Emerging Contributor

I am running into issues in the Do Until > Parse Json – Result Info step. It appears that it is the *Content Body option that is throwing this error. I currently have this set to Body (HTTP – Get Job Status). I have tried setting this to another Body file and the script will run through completion, but always results in the failed email. Has anyone else experienced something similar?

JessicaBennett_0-1674656663447.png

0 Kudos
Blevins_Mark
Frequent Contributor

I am getting an error from PA if I have a geopoint question..."An error occurred when rendering by the report engine.  Failed to print map for `${RepeatObservation.photolocation |drawingInfo:\"currentLayer\" | where:”ParentRowID=RowID !important” | map:” f87e4997dbad4d34828ef8f3763370f4”| size:600:0}`.  Waiting failed: 180000ms exceeded"...if I remove the geopoint question i can get it to run...anyone know how to get around this?

0 Kudos
abureaux
MVP Frequent Contributor

Oh man. This error...

To be honest, I don't have a silver bullet for this (but I do have a suggestion below). This has happened to me a few times in the past. It appears seemingly randomly, and then disappears just as mysteriously as it appeared. Nothing I do seems to affect this error (other than removing the geopoint, as you pointed out).

I have meant to followup with Esri on this while the issue is present, but haven't been able to yet (I'm also not experiencing this issue right now).

A potential workaround would be to use the new report generation method rather than the custom method I have detailed here. I am only saying potential workaround because I haven't seen this issue after swapping to the new method, but this error seems to pop up so infrequently that it's hard to say if this change has resolved the geopoint issue.

0 Kudos