I have Power Automate flow that takes data from Excel table and inserts it to SharePoint List. This works correctly, however due to user errors (e.g. inserting text into number columns) or SharePoint validation rules (all ID numbers must be unique to prevent duplication) some of the items fail and are not inserted.
I want to be able to generate a csv/excel dated file with all failed items and the reasons for failure after each flow so user can check data rows that failed and amend the issues with the data.
So if Action Fails and row of data from excel table cannot be added to the SharePoint I want it to generate new dated excel file (if this is the first error in current flow) and add the Failed Action row data with the error message plus any other Failed Action and their error messages.
What do I need to add to my current flow in order to achieve this?