Good morning all,
I have been scouring forums and have not been able to find a straightforward answer to see if people are able to use Enterprise Survey123 and Power Automate to Create report, upload to OneDrive, then email as an attachment.
I have the custom connector working and see the dynamic options for creating reports, etc. The problem is when it goes to upload file from URL. Using the Esri strategy for the AGOL of URL from first result of create report from this thread ends up giving an error for "a value must be provided for source path"
It seems like it cannot pass through the URL correctly. I have tried adding in the ?token=Portal Info Token as well, but that just spits back the actual token and I don't see the file, still giving error. Can this be done without the HTTP models I've seen in other posts?
Thanks!
Not sure if you were able to work this out but we use a similar workflow internally for some Survey123 items published to our ArcGIS Enterprise. With regards to a few of our setups, we use this simple flow:
For the HTTP setup, you will need to use the GET method with url for the attachment (in the screenshot). Then you will need to use the body of the HTTP request as the attachment for email/file upload/etc...
You can also have a branching flow where once you do the HTTP request, branch to send an email and upload to OneDrive. Hope this helps!
Hi Alex, thanks for the response. This seems like it should work in theory but HTTP is blocked by my org, hopefully I can work that out with them
It seems as though the create report is not working correctly for me. Even if you get the dynamic expressions, what are you using for Feature layer and report template? It seems like these need URLs for Enterprise.
Does Feature Layer get a full portal service URL, even with the /0 at the end?
Does the Report template need the full portal service URL as well or just the name of the docx form?
I get this error for Create Report - it can see the report name, but it is not generating the report...
I can't think of a way to get the attachment without the HTTP GET method so that will be necessary. That being said, is the ArcGIS Enterprise account that you are signed in with for this connector the same one that owns the survey? When you select the name of the survey it should automatically populate the dropdown for possible feature layer name options instead of you having to put it in yourself. That should also be the same for the report template:
That being said, I checked the raw inputs after running a successful flow and this is how it looks. I removed some identifying information and formatting but the inputs below relate to the survey, feature layer, report template, object ID, report name, and format.
"createFeatureReportBody/surveyItemId": "ff127403680347ae919d85dc5a9e7299",
"createFeatureReportBody/featureLayerUrl": "https://host.domain.com/webadaptor/rest/services/Hosted/service_72d20d8501914ec6a518756b5468159a/FeatureServer/0",
"createFeatureReportBody/templateItemId": "7eaaa8c49c1d4258a44d2b3de05fb778",
"createFeatureReportBody/queryParameters/objectIds": 214,
"createFeatureReportBody/outputReportName": "Site Checklist",
"createFeatureReportBody/outputFormat": "pdf"