Oct 20 2023 07:00 AM
I needed to edit/update four scripts I am running using Power Automate.
I made the changes to the scripts and ran the scripts in the Excel workbook, without issue.
However, the 'When a file is created or modified (properties only) Flow is now failing when it attempts to run the script. This has also happened in the past, during development, every time I made and edit to the script.
The file format type has not changed - Excel Workbook.xlsx.
What did/am I miss?
Oct 20 2023 08:33 AM
I could only make a guess. On initial stage you select file by name and apply script to it, it works. However, Power Automate doesn't care about filename, it actually works with file ID. When you create new file, even with same name, it has new ID. Script ignores that, it still tries to work with the file having another (old) ID. If so flow shall take first properties of created/modified file and file to which script shall be applied is selected based on these properties.
Oct 20 2023 09:25 AM
Oct 20 2023 09:36 AM
SolutionIn any scenario flow works with ID which was assigned on development phase at very beginning. If only you don't assign ID programmatically or didn't change it editing flow manually and selecting the file again on that step.