In this Power Automate tutorial, we will see how to fix an error ‘exceeds the maximum nesting limit of ‘8’‘. The error also comes as “power automate nested at level ‘9’ which exceeds the maximum nesting limit of ‘8’”. Also, we will discuss the different options that you can fix the error in PowerAutomate
Recently, we got a requirement from the client, to read the data from the Excel table and create a SharePoint list and columns using Power Automate. Their columns are of different data types such as
- Single line of text
- Multlines of text
So, based on this type we need to create columns in the SharePoint list, every time we need to check the data type and create a column using the action ‘Send an HTTP request to SharePoint’.
To check the data type and create a column in the SharePoint list we have used nested conditions. So, as per the Power Automate limitations ‘We have only 8 nested stages of conditions’ we get an error message ‘exceeds the maximum nesting limit of ‘8”.
To learn more about the power automation limitation you can check Microsoft’s official documentation.
Power Automate nested at level ‘9’ which exceeds the maximum nesting limit of ‘8’
To fix this error, if we analyze the scenario, there are 8 different types of data columns in the Excel ‘Data types’.
So, in this case, we can use the Switch case inside the Power Automate Flow, based on each data type we will create a case, and if the case is satisfied then it will create a column using ‘Send an HTTP request to SharePoint’.
Also, there are many different ways you can fix the error based on your business requirement, if the switch case doesn’t fix your error.
Option 1: You can reduce the count of the ‘Apply to each’ action in Power Automate. Like, every time we use an array in Power Automate flow, it will automatically add Apply to each action. However, in some cases, such as when processing approval task responses, there is just one item in this array and no loop is required. While it’s fine to retain it in the flow because it will only execute once, removing it will save you one nesting level.
Option 2: You can reduce the count of the ‘Condition‘ action in the Power Automate flow. As we are using condition to update the single value in the same action. For example, Change the value of a SharePoint field, send an email to a different user, and so on. In such cases, the if expression might be used instead of the ‘Condition’ action.
Option 3: You can add multiple conditions inside the single condition control. However, if you have numerous conditions with one similar result, you may apply the feature offered under Power Automate Condition Control, which allows you to add several rows of conditions. For example, if we have a single approver for two or more types of documents, you can create a single condition with many scenarios (rows) within it.
Option 4: The third way you can redesign the flow, which is a little time taking than the above 2 options. Perhaps you don’t require several nested ‘Condition’ and ‘Apply to each’ operations. The Power Automate flow can work just the same if you break down them – condition 1: perform a task; condition 2: perform a task.
These are the options including the switch case, you can fix the error ‘exceeds the maximum nesting limit of ‘8’‘.
In this Power Automate tutorial, we saw how we can fix the error ‘exceeds the maximum nesting limit of ‘8’‘. Also, we saw how we can fix the error using a switch case and if the switch case will not work for your business requirement, then you can check different options, as we discussed above.
- power automate nested at level ‘9’ which exceeds the maximum nesting limit of ‘8’
You may also like:
- attempted to perform an unauthorized operation. power automate error
- Power automate SharePoint multiple choice column to string
- Invalid Connection. Please Choose a Connection Power Automate
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com