I want to list all files in a one drive directory and copy them to a dynamic new directory (a backup procedure)
"statusCode": 200,
"headers": {
"Cache-Control": "no-cache",
"Pragma": "no-cache",
"x-ms-request-id": "ec76addc-c07a-480e-b2fb-7600749e3494",
"X-AspNet-Version": "4.0.30319",
"X-Powered-By": "ASP.NET",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "true",
"x-ms-apihub-obo": "false",
"Date": "Sun, 15 Oct 2023 14:35:23 GMT",
"Content-Type": "application/json; charset=utf-8",
"Expires": "-1"
},
"body": {
"value": [
{
"Id": "b!WeQ70c3UgUiPGKj2lNmCpLRuPAbFD89BkPdvrZuJT0R6hHK2iF-iQrPiUL343mPV.01FQY4PIEB6JOB2BDLO5FYJDTXOFXXGOMM",
"Name": "4week_delta.xlsx",
"NameNoExt": "4week_delta",
"DisplayName": "4week_delta.xlsx",
"Path": "/drives/b!WeQ70c3UgUiPGKj2lNmCpLRuPAbFD89BkPdvrZuJT0R6hHK2iF-iQrPiUL343mPV/root:/power BI dashboard/_current/4week_delta.xlsx",
"LastModified": "2023-09-05T15:49:51Z",
"Size": 157757,
"MediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"IsFolder": false,
"ETag": "\"{1D5CF281-6B04-4B77-848E-77716F73398C},22\"",
"FileLocator": "b!WeQ70c3UgU................
But appy to each cannot handle the result
I entered value as parameter and this is the result :
The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_2')' is of type 'Object'. The result must be a valid array.
what is wrong with this set up?