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 Solution
    • 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

Building a state machine in Power Automate flow

Posted on April 5, 2023April 5, 2023 by Tom

“I’d like to send the request back and forth, to return it back to previous approval steps etc, how can I do some state machine in Power Automate?”


Some flows are not a simple, straightforward approval process. Sometimes you need more than just approve or reject, but also the ‘return to previous step’ option. How do you build such flow in Power Automate? A flow that doesn’t move only forward, but can occasionally move also backwards? Something like a state machine that can move between different states?

Utilise the infinite trigger loop

While the infinite trigger loop is often a painful issue, when building a state machine it’s quite useful. Since Power Automate doesn’t have a dedicated state machine logic, you’ll have to build it yourself. And for this you can benefit from the infinite trigger loop.

Instead of a real state machine where you can skip between branches, you can build a flow that’ll be started repeatedly. A flow that’ll contain e.g. a switch, and depending on the request status it’ll go through one of the branches. Once the branch is finished, update the item with the new status. The infinite trigger loop will start another instance of the flow, this time going through a different path.

Power Automate state machine

Since it’ll be multiple flows instead of one, you’ll have to store the ‘shared’ information somewhere in the list. But that’s a small downside for being able to go back and forth in your flow.

Summary

When building a state machine in Power Automate, you can benefit from the infinite trigger loop – once you update an item, it’ll start another instance of the flow. And since it’s a new instance, it can go any of the available paths, depending on some value. Start the flow, do what’s necessary, and change the status. The flow will run again and do the tasks for this new status.


πŸš€ Master Power Automate

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

No spam. Unsubscribe anytime.

1 thought on “Building a state machine in Power Automate flow”

  1. Pingback: List of functionality for every Power Automate approval process

Leave a Reply Cancel reply

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

πŸš€ Master Power Automate

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

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Get the Approval Process solution and the Task Delegation App to skip the hard part and deploy an automated, 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