
A well-known problem with Power Automate is the infinite loop when using the SharePoint “when created or modified” trigger.
The error occurs when a user who created an item starts the flow that will modify that same item and, in this way, the modification will enter in an infinite loop.
How to solve it
The solution requires you to create an environment variable to use in your trigger settings.

Using Power Automate’s best practices, the first step is to create an environment variable containing the service user.

Then create a variable with the system account email.

Now, in the trigger settings, use the following instruction:


If you are not using environment variables, just pass the email as a string instead of the environment variable.
TIP:
parameters(‘itRobot (new_itRobot)’) and triggerOutputs()?[‘body/Editor/Email’] are values that can be obtained by defining a dynamic variable from the item editor. Then just copy this variable and paste it in any text editor or in your browser’s URL and this value will be displayed in text. The same applies for System Account using a compose for example. And this is how you avoid infinite loop in Power Automate!
Ready to streamline your business processes with Microsoft Power Automate?
Contact us for:
- Automated Workflows: Create automated workflows to save time and reduce manual tasks.
- Integration Capabilities: Seamlessly integrate with Microsoft 365 and other services.
- Boost Productivity: Increase efficiency by automating repetitive tasks and processes.
- Custom Automation: Design custom automation solutions tailored to your specific business needs.
- Cross-Platform Automation: Connect multiple platforms and applications for comprehensive automation.
- Real-Time Notifications: Receive instant alerts and updates to stay informed.
- AI and RPA: Leverage artificial intelligence and robotic process automation for advanced automation.
- User-Friendly Design: Build automation workflows with an intuitive, no-code/low-code interface.
- Data-Driven Decisions: Utilize automated data collection and processing for better decision-making.
- Expert Support: Benefit from our consultancy services to optimize your Power Automate strategy.
If you are interested in learning more about us and how we can help you, contact us or read more about it here.
You can also check out our blog for more articles and insights on Microsoft 365 technologies.