Error messages › Scopes, loops and run after
Run after points somewhere it can't
Seen when saving a flow · Updated 8 November 2026
The message
The template validation failed: the action 'Alert' at line '1' and column '2' must have a 'runAfter' property that references an action at the same scope.
What it means
A step is set to run after a step in a different branch or container. Run after can only point at an earlier step at the same level.
How to fix it
- Move the step so it sits directly after the one it should follow, at the same level.
- To act when any of several steps fail, put them inside a Scope and set the alert to run after the Scope has failed.
- A step can only use the outputs of steps that run before it on the same path. Move it below that step, or move that step out of the Condition or Scope branch it sits in.
Not quite your message? Paste the whole thing into the Flow Doctor. It reads the step, property and expression out of your exact wording and, for the stubborn ones, the AI reads the flow it happened in.
How to find the full error in Power Automate
- Open the flow and look at 28-day run history.
- Select the failed run (red cross), then the step with the red cross.
- The error is in that step's box; some are under Show raw outputs. Copy the whole thing, including the code at the start.
Other Scopes, loops and run after errors
AutomateAlong is independent and isn't affiliated with Microsoft. Microsoft and Power Automate are trademarks of the Microsoft group of companies.