I have a flow that starts when I new file is created. Turns the CSV into an excel file, saves it to a one drive folder and then runs a script to clean up the file. All of it works, up to the part of running the script. If I open the file in Excel Online and run the script, all is good. But when the flow tries to run it, I get this error.
We were unable to run the script. Please try again.
Workbook not found.
clientRequestId: f6513d18-324b-4f26-9544-d17c6a53d539
This is the raw output.
{
"statusCode": 404,
"headers": {
"Access-Control-Expose-Headers": "Version",
"x-ms-workflow-name": "****************************",
"Version": "2.5",
"x-ms-client-request-id": "****************************",
"x-ms-request-id": "****************************",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "true",
"Cache-Control": "no-store, no-cache",
"Date": "Fri, 21 May 2021 14:23:44 GMT",
"Content-Length": "165",
"Content-Type": "application/json"
},
"body": {
"message": "We were unable to run the script. Please try again.\nWorkbook not found.\r\nclientRequestId: f6513d18-324b-4f26-9544-d17c6a53d539",
"logs": []
}
}
Now, if I go back in and redrill back to the file again, all runs well

{
"statusCode": 200,
"headers": {
"Transfer-Encoding": "chunked",
"Vary": "Accept-Encoding",
"Access-Control-Expose-Headers": "Version",
"x-ms-workflow-name": "*****************************",
"Version": "2.5",
"x-ms-client-request-id": "*****************************",
"x-ms-request-id": "*****************************",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"Cache-Control": "no-store, no-cache",
"Set-Cookie": "ARRAffinity=fbf12317b41409d837dc9258ca2fd506a0e78d7705046af5c2a888ad2128246d;Path=/;HttpOnly;Secure;Domain=excelonline-eus.azconn-eus.p.azurewebsites.net,ARRAffinitySameSite=fbf12317b41409d837dc9258ca2fd506a0e78d7705046af5c2a888ad2128246d;Path=/;HttpOnly;SameSite=None;Secure;Domain=excelonline-eus.azconn-eus.p.azurewebsites.net",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "false",
"Date": "Fri, 21 May 2021 14:31:46 GMT",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "25"
},
"body": {
"logs": []
}
So I think it has something to do with the "File" portion of the excel part of the flow. It is using the file ID instead of just the file name?
Any thoughts on how to get around this?
Thanks
Chip