Introduction

Power Automate flows allow the design of simple, medium to more complex, and, at the same time, very efficient processes. Often, it becomes trickier to troubleshoot the complex design, like using conditional Blocks, scopes, and For Each. I have come across the issue that says, ‘Power flow’s logic app flow template was invalid. The template actions are nested at level 9, which exceeds the maximum nesting limit of 8.

Below is a screen capture for reference.

Power flow

Error Message. The power flow's logic app flow template was invalid. The template actions 'Compose_9' are nested at level '9', which exceeds the maximum nesting limit of '8'

What is nesting in Power Automate?

Let’s get into the basics of nesting. If you define an action inside conditional logic, such as If-else or Foreach, it becomes a nesting level. Below is the screen capture for reference.

Here, the ‘Compose’ action is at nesting level 1.

Compose

If you have another condition defined under the ‘Yes’ block after the composing action and define a compose inside the ‘Yes’ block, the nesting level for this compose two actions is at level 2.

Yes Block

Likewise, this nesting could go up to 8 levels. After that, you end up with an error saying that the flow cannot be saved as it passes the nesting limit 8. Here, I tried to save the flow after having eight nesting conditions.

Nesting

Overcoming the nesting limit

Below are some of the practices that could help in limiting the nesting condition.

References