In Power Automate, the “Run After” condition allows you to control when an action should execute based on the status of a previous action. The error “Invalid Run After Condition” occurs when:
The previous action does not exist or is incorrectly referenced.
The selected “Run After” condition does not match the previous action’s result.
The flow is using an incorrect or conflicting combination of “Run After” conditions.
The flow structure has unhandled failures or missing dependencies.
This guide explains:
🔹 Common causes of “Invalid Run After” condition errors
🔹 How to diagnose and fix these issues
🔹 Best practices to prevent future errors
Step 1: Understanding “Run After” Conditions
In Power Automate, you can configure an action to run based on the outcome of a previous action:
Condition | Meaning |
---|---|
is successful | The previous action completed without errors. |
has failed | The previous action encountered an error and failed. |
is skipped | The previous action was skipped due to a condition not being met. |
has timed out | The previous action exceeded the maximum execution time and timed out. |
Example:
🔹 If you want to send a notification only if a previous step fails, set the “Run After” condition to “has failed”.
🔹 If you want to run an action only if the previous action is successful, use “is successful”.
Step 2: Diagnosing “Invalid Run After Condition” Errors
2.1. Check Flow Run History
- Open Power Automate (https://make.powerautomate.com).
- Navigate to My Flows → Select the failing flow.
- Click Run History and open a failed run.
- Look for the action that shows the “Invalid Run After Condition” error.
- Identify:
- ✅ Which action it depends on.
- ❌ What the actual outcome of the previous action was.
- ⚠ Whether the selected “Run After” condition matches the actual result.
Step 3: Fixing “Invalid Run After” Conditions
3.1. Ensure the Previous Action Exists
Problem: The action you are referencing in “Run After” does not exist (e.g., deleted or renamed).
Solution:
- Check if the previous action is still present in the flow.
- If it was deleted, add the action back or update the “Run After” reference.
3.2. Match “Run After” Conditions to the Correct Outcome
Problem: The action is set to run after success, but the previous step failed or was skipped.
Solution:
- If an action might fail but the next step should still run, set “Run After” to “has failed” OR “is successful”.
- If an action should only run when the previous step succeeds, ensure it’s set to “is successful” only.
Example: Correcting “Run After” settings
✔ If an email action should always run, no matter the previous step’s outcome:
Run After: "is successful" OR "has failed" OR "is skipped"
✔ If a notification should only send on failure:
Run After: "has failed"
3.3. Avoid Conflicting “Run After” Conditions
Problem: You selected contradictory “Run After” conditions, making the logic invalid.
Solution:
- Do not select both “is successful” and “has failed” together unless the scenario requires it.
- Use conditions that logically follow each other.
Example: Correct vs. Incorrect “Run After” Setup
Correct:
✔ Action B
should run if Action A succeeds OR fails → Set “Run After” to “is successful” OR “has failed”.
Incorrect:
❌ Action B
should run if Action A succeeds AND fails at the same time (which is impossible).
3.4. Fix “Run After” for Skipped Actions
Problem: The flow is skipping an action, causing an unintended failure.
Solution:
- If an action depends on a condition, ensure the correct “Run After” setup:
- If Condition = False, the action might be skipped.
- Set the next step to “Run After: is skipped” to handle this scenario.
Example: Handling a skipped action
✔ If an approval request is rejected, send a notification:
Run After: "is skipped"
3.5. Handling Loops & Parallel Branches
Problem: In loops or parallel actions, an action is set to run after multiple conditions, causing conflicts.
Solution:
- Ensure each action within a loop or parallel branch has proper dependencies.
- Use separate condition checks before executing actions.
Step 4: Preventing Future “Run After” Errors
✅ 4.1. Always Test Flows Before Deployment
- Run test executions to check how conditions affect “Run After” settings.
- Debug unexpected skips or failures early.
✅ 4.2. Use Expressions to Validate Data Before “Run After” Conditions
- Use expressions like
coalesce()
orempty()
to ensure values exist before a condition runs.
✅ 4.3. Add Error Handling Actions
- Add a “Scope” or “Try-Catch” approach to handle errors gracefully.
- Example: If an API call fails, retry it or send an alert.
✅ 4.4. Organize Flow Logic to Minimize Dependencies
- Reduce dependencies between actions by using variables or breaking flows into smaller child flows.
- Example: Instead of waiting for multiple conditions, execute them independently where possible.
Step 5: Setting Up Alerts for “Run After” Failures
To detect “Run After” issues early, set up an alert:
- Add a Condition action to check if an action is skipped.
- If an action was skipped incorrectly, send an alert email.
- Example:
If Action is Skipped → Send Alert Email "Unexpected Skipped Action Detected!"