In Power Automate I have an Update Item action that references a field containing (potentially) multiple user accounts. Every time I put in the field's value, Power Automate helpfully embeds the Update Item action inside a loop, presumably to loop through however many email addresses/user accounts there may be in this field. That's fine.

The problem is that for some reason I can't rename the loop. Every time I do, when I go to save, I get the following message:

Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The repetition action(s) 'Apply_to_each' referenced by 'inputs' in action 'Update_to_Step_1' are not defined in the template.'.'.

Googling around has produced some hits on those terms but none have applied to my situation exactly, it's usually got to do with using JSON somewhere in the action, which I'm not doing. I'm simply trying to take the account from one field and copy it into another field.

How can I rename this loop but avoid the error above?

  • 1
    I think the reason you are getting this error is that the flow is identified to contain logic or configuration error. Would you care to share the flow process you are using? Also is the flow running properly if you leave the name of the action as it is? – Chelsea_MSFT Oct 16 '20 at 8:31
  • Hi Chelsea, I'd be happy to share more details if it will help. The flow is supposed to iterate through a series of accounts and create approvals for each in order. The piece that's bugged is very simple, just an Update Item action where I try to plug in the account from a previous step and it jumps into this loop which I can't rename. Everything works fine if I leave the name as-is. – thanby Oct 16 '20 at 14:26

I also faced same issue for that, you just need to re write all logics under that apply to each, because when you change its name then previously defined data will not able to find 'Apply To Each' named loop. So rewrite all variable/properties after renaming loop.

  • 1
    I found the pieces of logic in the item that were causing the problem. Their data sources had the original name of the loop in them. Deleting and re-adding them corrected the issue. Thank you! – thanby Oct 26 '20 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.