I have a Power Automate flow that is triggered with the Survey123 "When a survey response is submitted" trigger. Part of that flow is the creation of a report, then the report is uploaded to OneCloud and attached to an email (see attached screenshot of the flow). This flow has been run hundreds of times, the vast majority of them have been successful; however, seemingly randomly, the flow will fail and it always fails with an error message of "A value must be provided for source path." (see attachment for failed flow run).
The Create report step reports that it has succeeded (green check mark), but when the Output of the Create Report step is examined, the jobStatus is "esriJobFailed" (see screenshot of output message).
It seems that there are two errors in the Create Report that can be the cause. Either
Layer specified by featureLayerUrl does not exist or is not accessible.503: An error occurred.
The specified layer does exist, I'm not sure why it would be inaccessible one second and accessible the next.
OR
An error occurred when querying data from the feature layer. 503: An error occurred.
So, it seems to me that there is an error occurring when creating the report which in turn prevents the file (which is never created) from being uploaded and then attached to the email. This error is not consistent, because the flow will run successfully multiple times and then fail, then run successfully, then fail (see run history screenshot). Any idea what could be causing this?
An example of the full text of the Create Report output body:
{
"statusCode": 200,
"headers": {
"Via": "1.1 4a3448a83573e51d340356257951f57a.cloudfront.net (CloudFront)",
"ETag": "W/\"35d-W2a32/eeMDN25fwxkZLUqn+3b4c\"",
"Vary": "Origin,Accept-Encoding",
"X-Frame-Options": "SAMEORIGIN",
"Strict-Transport-Security": "max-age=63072000; includeSubdomains; preload",
"X-Cache": "Miss from cloudfront",
"X-Amz-Cf-Pop": "DEN52-P3",
"X-Amz-Cf-Id": "eK-92homNDWOxO1G92luIBlLKYh1TuBlPTBidnWLgqZQ203UD1gqTw==",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "true",
"x-ms-apihub-obo": "false",
"Date": "Tue, 07 May 2024 15:23:27 GMT",
"Content-Length": "861",
"Content-Type": "application/json"
},
"body": {
"jobId": "5bd9af72eb6b4510b0ce832e17bbdeda",
"jobStatus": "esriJobFailed",
"jobStatusInfo": {
"detailedStatus": "prepareFailed",
"startTime": 1715095398525,
"progress": 0
},
"submitted": 1715095398325,
"completed": 1715095405088,
"resultInfo": {
"title": "Weed Mowing Work Order (9-04-12-11-181-025-05-7-24)"
},
"inputInfo": {
"jobType": "createReport",
"parameters": {
"queryParameters": {
"objectIds": "1531"
},
"templateItemId": "09c1a62a967b4ccfbca7f050d25ca738",
"surveyItemId": "REDACTED",
"outputFormat": "pdf",
"outputReportName": "Weed Mowing Work Order (9-04-12-11-181-025-05-7-24)"
}
},
"messages": [
"An error occurred when querying data from the feature layer. 503: An error occurred."
]
}
}