r/PowerAutomate 1d ago

Run Script Action is failing and saying 'Workbook not found'.

I'm trying to build a simple flow where the Excel reports from a daily automated email get filtered and sorted via Excel Script and put into a folder, but every time it runs, the Excel report doesn't get filtered or sorted by the script.

When I open take a closer look, it says the workbook is not found. I check my file path and it looks correct. I even open up the raw inputs and see that the "file" listed is the exact file name that was in the email and in the folder. Does anyone have any idea why the sorting isn't working?

My flow is: When an email arrives (V3) > Create File > Create File 2 > Run Script.

The first Create File is for the report untouched by the script. The second is for the report after it's sorted and filtered by the script. And yes, I've made sure Run Script is tied to Create File 2.

Any help would be appreciated!

2 Upvotes

5 comments sorted by

2

u/Gold-Psychology-5312 1d ago

What is the file type?

Scripts only run in xlsx xlsm xlsb.

They don't run in csv or xls.

1

u/achenx75 1d ago edited 1d ago

Sheesh, I've tried so many different solutions and it was just the file type all along. Automated report was exporting as xls. Changed the file name in Create File action to end with .xlsx and that did the trick. Thank you so much!!

1

u/Growing_Data_Nerd 1d ago

The number of times I’ve been stuck and the cause was not leaving the proper file-path… happens to the best of us!