Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

How to solve the nesting limit of ‘8’ error in Power Automate

Posted on February 13, 2022February 13, 2022 by Tom

“I can’t save the Power Automate flow I just built, it shows me the maximum nesting limit of ‘8’ error, how can I solve it?”

“The power flow’s logic app flow template was invalid. The template actions ‘xxx’ are nested at level ‘9’ which exceeds the maximum nesting limit of ‘8’.”


Even though Power Automate allows you to build very complex flows, it has limits. One of them is how deep you can go using the control actions like the ‘Condition’, ‘Apply to each’, ‘Switch’, etc. Each of these actions inside another one adds a new nesting level in the flow. Once you overcome the 8th nesting level, you won’t be able to save the flow. All the work you did on the flow could be lost just because of that.

Power Automate nesting limit error

This post will show you some solutions how to stay within this limit.

Use configuration list(s)

If the nested levels are caused mostly by ‘Condition’ actions, you should consider using a configuration list. Instead of many comparisons you could have a single lookup to find the corresponding value right away.

Power Automate nesting limit error

Reduce the number of ‘Apply to each’ actions

Every time you process an array in Power Automate, it’ll add ‘Apply to each’ automatically. But sometimes, e.g. when processing approval task response, it’s only a single item in this array and you don’t need a loop. While it’s ok to keep it in the flow as it’ll run only once anyway, you can save one nesting level if you remove it.

Check your flow for such ‘Apply to each’, maybe there’s one that you could remove.

Power Automate nesting limit error

Reduce the number of ‘Condition’ actions

From time to time you use ‘Condition’ only to change a value in the same action. Update a SharePoint field with a different value, send an email to different user, etc. In such situations you don’t need the ‘Condition’ action, you can use the if(…) expression instead as explained in the date formatting article.

Power Automate nesting limit error

Redesign the flow

Another approach, which is a bit more time consuming than the two above, might be to redesign the whole flow. Maybe you don’t need so many nested ‘Condition’ and ‘Apply to each’ actions. The flow could work just as well if you separate them – condition 1: do something; condition 2: do something else.

Summary

The Power Automate nesting limit error is not something you can disable. You must solve it, and it’ll require a change in your flow. It can be a big change as changing the whole flow design, or it can be a smaller change when you just replace a ‘Condition’ or an ‘Apply to each’ with an expression. The outcome is clear – maximum 8 nested controls, and it’s up to you how you achieve it.


πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Working on an Approval process?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy a fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes