Flow save failed with code 'InvalidTemplate' and message 'The template validation failed:

Copper Contributor

I am currently trying to modify a Power Automate approval flow in order
to allow several approvals and save the name/email of each approver in the column of a Document Library, however I am receiving the following error message in the final part

 

Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of template action 'Update_file_properties' at line '1 and column '5237' is invalid. Action 'Apply_to_each' must be a parent 'foreach' scope of action 'Update_file_properties' to be referenced by 'repeatItems' or 'items' functions.'.'.

2 Replies
What is the ID attribute of your Update File Properties? It looks like a property from another For Each and I'm wondering if that's the issue. If changing that doesn't work, it may be best to delete the update file properties step and set that step up again.
You are using current item for the id field which is wrong as that id that you are trying to update is the internal id for sharepoint. Check the get items/get item(basically where you fetched the data from sharepoint list) property of your flow and populate the id from there.