SOLVED

After Edit Script Run through Power Automate is Failing

Brass Contributor

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?

Phishdawg_0-1697810141455.png

 

3 Replies

@Phishdawg 

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.

...consequently, if I test in Power Automate using a failed run, the Flow will be looking for the same 'ID' associated with the failed run rather than acting upon the 'ID' associated with the new overwrite?

Is this correct?
best response confirmed by Phishdawg (Brass Contributor)
Solution

@Phishdawg 

In 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.

1 best response

Accepted Solutions
best response confirmed by Phishdawg (Brass Contributor)
Solution

@Phishdawg 

In 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.

View solution in original post