Hi @neko96
The action "List files in folder" also returns folder along with files and the flow is failing when it encounters folder in the output array of this action.
To resolve this issue, add "Filter array" action just after "List files in folder" action and apply filter query to filter out the folders from the output of list files in folder action. Pass the value object from the output of "List files in folder" action in 'From' parameter. Click 'Edit in advanced mode' button on the bottom and enter the below query:

Enter the below query in the textbox:
@equals(item()?['IsFolder'], false)
Finally, pass the output body of filter array to 'Apply to each' action as its input:

Pls retest the flow after making the required changes.
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.