If your Flow in API version 56.0 and earlier receives the “Number of iterations exceeded” error, it may be because of a Loop element that’s trying to process more records. We have a limit of 2000 executed elements at run time.
Flow Builder
The reason this limit is hit is that when looping through records, it is that each element in the loop counts as an executed element multiple times (once per record that you loop through).
For example, consider a Flow with Get Records, Loop (looping through the Get Records result and two Assignment elements, setting the Value and adding to Collection) and finally a Update Records.
Number of records executed: Get Records element + [number of records * 3 (as we have 3 elements that run for every record in the loop)] + Update Records element.
The total value should be less than or equal to 2000. If the values exceed 2000, you will notice, "Number of Iterations Exceeded" error.
Here are a few suggestions to work around the error.
NOTE: These alternatives are possible suggestions. Any implementation suggestions related to flows will be out of scope for support.
In API version 57.0, the limit of 2000 Flow elements was removed. In API version 56.0 and earlier, flows could have a maximum of 2000 Flow elements. For more information on the latest version, visit the product Help on General Flow Limits.
000382258

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.