A word to the wise, do not count on, or even use the Undo command in Flow as it gives very unreliable results!
Flow introduced a new Undo command recently after much grovelling from its users, refer to:

The issue is that the command doesn’t work and can result in unpredictable and disastrous results!
I used it today after simply adding a Condition control action and then wanting to Undo it. Wow, instead of just removing the newly inserted action, it also reorder my entire flow, moved actions to differ branches and switched certain types of branches altogether. A nightmare.
Now, if you notice the disastrous undo changes, great, but I’m sure people out there don’t always notice, or the screw-up may be less noticeable than what occurred in my case and so they may continue and save, causing untold issues with their flow the next time it is run.
Never say you weren’t warned!
Instead, the better options is to simply save your work frequently and exit the current edit without saving and reopening the flow if you make a mistake. Otherwise, you may end up with a real mess on your hands (talking from experience!) and spend hours putting things back in order.
Yes, I’ve already notified Microsoft’s Dev Team of the issue, given them complete screenshots and flow details so they can resolve the root cause hopefully, but all that takes time (more than a year after reporting the bug with the MySQL connector not autoincrementing upon insertion still remains to this date!).
And that was my ‘learn from my mistakes’ tips of the day.
