Fix Common Power Automate Errors: Troubleshooting Guide
Your Power Automate flow worked perfectly yesterday. Today it's failing with cryptic error messages. You've got no idea where to start debugging, and every failure means missed automation opportunities.
Power Automate errors are frustrating, but most follow patterns. Once you understand the common culprits and how to fix them, you'll spend less time troubleshooting and more time building workflows.
What You'll Learn
- The 10 most common Power Automate errors
- Step-by-step debugging techniques
- How to read and interpret error messages
- Prevention strategies for each error type
- Performance optimization to avoid timeouts
- Best practices for reliable flows
Understanding Error Messages
Power Automate errors have three parts:
- Error code:
InvalidTemplate,Timeout,ActionFailed - Error message: Human-readable description
- Action details: Which step failed and why
How to view errors:
- Open your flow
- Go to "Run history"
- Click the failed run
- Expand failed action to see details
Error 1: "The execution of template action failed"
What it means: Something went wrong in an action, but the message is vague.
Common causes:
- Incorrect expression syntax
- Missing required inputs
- Null or empty values where data is expected
Solution: Check Expression Syntax
Bad: @item()['Email'] // Quotes may cause issues
Good: @items('Apply_to_each')?['Email']
Bad: @body('Get_items')
Good: @outputs('Get_items')?['body']Solution: Add Null Checks
// Check if field exists before using @if(not(empty(triggerOutputs()?['body/Email'])), triggerOutputs()?['body/Email'], 'no-email@example.com') // Or use coalesce for simpler default values @coalesce(triggerOutputs()?['body/Email'], 'default@example.com')
Prevention
ā
Always use ? for safe navigation: @body('action')?['field']
ā
Test with empty/null data during development
ā
Add condition actions to check for required data before using it
Error 2: "Request timeout"
What it means: An action took longer than the timeout limit (default 2 minutes for most actions).
Common causes:
- Processing large datasets
- Slow external API responses
- Complex loops taking too long
Solution: Increase Timeout Settings
- Click the action
- Go to Settings (three dots)
- Expand "Networking"
- Set "Timeout" to higher value (max 30 days for async operations)
Solution: Optimize Loops
// Bad: Loop through 1000 items one by one Apply to each: items - Send email to item // Good: Batch operations Select: Take first 50 items Apply to each: selected items - Send email to item Delay until: (schedule next batch)
Solution: Use Async Patterns
For long-running operations, use "Do until" with status checks:
1. HTTP: Start long job (returns job ID)
2. Initialize variable: jobComplete = false
3. Do until: jobComplete = true
- Delay: 30 seconds
- HTTP: Check job status
- Condition: If status = complete
- Set variable: jobComplete = truePrevention
ā
Limit loop iterations: Use "Top count" in queries
ā
Add pagination: Process large datasets in chunks
ā
Test with realistic data volume before deploying
Error 3: "Expression evaluation failed"
What it means: Your dynamic content expression has a syntax error.
Common causes:
- Missing parentheses or quotes
- Incorrect function names
- Referencing non-existent fields
Solution: Validate Expression Syntax
Common mistakes:
// Missing closing parenthesis
Bad: @concat('Hello', ' World'
Good: @concat('Hello', ' World')
// Wrong function name
Bad: @tostring(item()['ID'])
Good: @string(item()['ID'])
// Missing quotes around strings
Bad: @if(equals(item()['Status'], Active), 'Yes', 'No')
Good: @if(equals(item()['Status'], 'Active'), 'Yes', 'No')Solution: Use Expression Builder
- Click field where you want expression
- Click "Expression" tab
- Use function picker instead of typing manually
- Test with "Peek code" to see full expression
Common Expression Patterns
// Get current date
@utcNow()
// Format date
@formatDateTime(utcNow(), 'yyyy-MM-dd')
// Convert to string
@string(outputs('Get_item')?['body/ID'])
// Convert to integer
@int(outputs('Get_item')?['body/Count'])
// Concatenate strings
@concat('Hello ', variables('Name'))
// Get item from array
@first(outputs('Get_items')?['body/value'])
// Check if empty
@empty(triggerOutputs()?['body/Email'])
// Replace text
@replace(body('Compose'), 'oldtext', 'newtext')Prevention
ā
Use expression builder instead of typing manually
ā
Test expressions in "Compose" actions before using in critical steps
ā
Add comments to complex expressions
Error 4: "Could not execute the API request"
What it means: Connection to external service failed.
Common causes:
- Authentication expired
- API endpoint changed
- Network connectivity issues
- API rate limits exceeded
Solution: Reconnect Authentication
- Go to "Data" ā "Connections"
- Find the failing connection
- Click "Fix connection"
- Re-authenticate
Solution: Handle Rate Limits
// Add retry policy to action Settings ā Retry Policy: Type: Fixed Interval Count: 3 Interval: PT1M (1 minute)
Or add delay between API calls:
Apply to each: items - Delay: 2 seconds - HTTP request: API call
Solution: Test API Endpoint Separately
Use tools like Postman to verify:
- API is accessible
- Authentication works
- Response format hasn't changed
Prevention
ā
Use service accounts (not personal accounts) for production flows
ā
Monitor connection expiration dates
ā
Add error handling to API calls (scope + configure run after)
Error 5: "Unable to process template language expressions"
What it means: Dynamic content reference is invalid or points to nothing.
Common causes:
- Referencing action that hasn't run yet
- Action name changed/deleted
- Field doesn't exist in the data
Solution: Check Action Names
Make sure you're referencing the correct action name:
// Bad: Using display name with spaces
@outputs('Get Items')?['body']
// Good: Using action's technical name (no spaces)
@outputs('Get_Items')?['body']Solution: Verify Data Structure
- Run flow successfully once
- Look at outputs in run history
- Note the exact structure of returned data
- Update references to match actual structure
// If data looks like:
{
"body": {
"value": [
{"ID": 1, "Title": "Item 1"}
]
}
}
// Reference as:
@outputs('Get_items')?['body/value']Solution: Use "Peek Code" to See References
- Click any field with dynamic content
- Click "Peek code"
- See the actual expression being used
- Verify it matches your data structure
Prevention
ā
Always test flows with real data
ā
Don't rename actions after adding dynamic content references
ā
Use schema in Parse JSON to ensure consistent structure
Error 6: "The workflow run was canceled"
What it means: Flow was manually stopped or hit concurrency limits.
Common causes:
- Multiple runs started simultaneously (concurrency control)
- Manual cancellation
- Deployment while flow was running
Solution: Adjust Concurrency Settings
- Go to flow settings
- Click "Concurrency Control"
- Options:
- Off: Run all instances simultaneously (default)
- On: Limit concurrent runs
- Degree of parallelism: Set max concurrent runs (1-50)
When to use: - Turn OFF for independent actions - Turn ON (degree=1) when modifying same records - Set degree=5-10 for controlled parallelism
Solution: Add Wait Actions for Conflicting Operations
// If multiple flows might update same record: 1. Get item 2. Update item 3. Delay: 5 seconds 4. Continue
Prevention
ā
Design idempotent flows (can run multiple times safely)
ā
Use unique IDs to avoid race conditions
ā
Test concurrent scenarios during development
Error 7: "Unauthorized" (401) or "Forbidden" (403)
What it means: Insufficient permissions to perform action.
Common causes:
- User doesn't have permissions to resource
- API key expired
- SharePoint/List permissions not granted
Solution: Check Permissions
For SharePoint/Lists:
- Verify user has access to list/library
- Check if connection uses correct account
- Ensure site collection permissions are correct
For Outlook/Teams:
- Check delegated permissions
- Verify mailbox access
- Confirm Teams membership
Solution: Use Service Account
For production flows, use dedicated service account:
- Create service account with specific permissions
- Use "Connection" with that account
- Avoid using personal accounts
Prevention
ā
Grant minimum required permissions to service accounts
ā
Test with production permissions before deploying
ā
Document required permissions for each connection
Error 8: "InvalidTemplate" or "BadRequest"
What it means: Flow design has structural issues.
Common causes:
- Missing required parameters
- Incorrect data types
- Malformed JSON
Solution: Validate Required Fields
Check every action for required fields (marked with *):
// Ensure all required fields are filled - SharePoint: List Name*, Item ID* - HTTP: URL*, Method* - Send Email: To*, Subject*, Body*
Solution: Fix Data Type Mismatches
// Bad: Passing string where number expected
Choice field: "High" // Should be number
// Good: Convert types explicitly
@int(variables('Priority'))
// Bad: Passing array where string expected
Email To: @outputs('Get_items')?['body/value']
// Good: Extract string from array
Email To: @join(outputs('Get_items')?['body/value'], ';')Solution: Validate JSON
For "Parse JSON" or "HTTP" actions with JSON:
- Use online JSON validator
- Check for:
- Unmatched braces
{} - Missing commas
- Unquoted strings
- Invalid escape characters
- Unmatched braces
Prevention
ā
Use schema generation in Parse JSON
ā
Test with sample data before deploying
ā
Validate JSON using external tools
Error 9: "ItemNotFound"
What it means: Referenced item doesn't exist.
Common causes:
- Item was deleted
- Wrong list/library selected
- Item ID doesn't exist
Solution: Add Existence Checks
1. Get item (configure "run after" to include failed) 2. Condition: Check if Get Item succeeded Yes path: Continue processing No path: Log error or take alternative action
Solution: Use Try-Catch Pattern
1. Scope: Try - Get item - Update item 2. Scope: Catch (configure run after = has failed) - Send notification: Item not found - Log to SharePoint list
Prevention
ā
Validate item exists before operations
ā
Add error handling for all get/update actions
ā
Use "Get items" with filters instead of direct "Get item" when possible
Error 10: Poor Performance (Slow Flows)
What it means: Flow works but takes too long.
Common causes:
- Too many API calls in loops
- Unnecessary delays
- Inefficient queries
Solution: Optimize Queries
// Bad: Get all items, filter in loop
Get items: No filter
Apply to each: items
Condition: Status = Active
Do something
// Good: Filter in query
Get items: Filter query = Status eq 'Active'
Apply to each: items
Do somethingSolution: Reduce API Calls
// Bad: Get single item 100 times Apply to each: IDs Get item by ID // Good: Get all items once Get items: Filter by IDs in current batch Apply to each: returned items Process item
Solution: Use Parallel Branches
For independent operations, run in parallel:
// Instead of sequential: 1. Get users 2. Get files 3. Send email // Use parallel branches: Parallel: Branch 1: Get users Branch 2: Get files Then: Send email
Prevention
ā
Use OData filters in queries
ā
Batch operations when possible
ā
Profile flow performance in run history
ā
Remove unnecessary delays
Debugging Techniques
1. Add Compose Actions
Insert "Compose" actions to see intermediate values:
1. Get items
2. Compose: @outputs('Get_items')?['body/value'] // See full array
3. Apply to each: items
- Compose: @items('Apply_to_each')?['Title'] // See current item
- Update item2. Use Run History
Every run shows:
- Duration of each action
- Inputs sent
- Outputs received
- Error details
To debug:
- Run flow with test data
- Open run history
- Expand each action
- Compare inputs/outputs to expected values
3. Test in Isolation
Create simplified test flow:
- Copy failing action to new flow
- Add manual trigger
- Use sample data
- Test until working
- Copy back to main flow
4. Check Flow Checker
Built-in validation:
- Click "Flow checker" (top right)
- Review warnings and errors
- Fix suggested issues
Best Practices for Reliable Flows
ā
Always use optional chaining: ?['field'] instead of ['field']
ā
Add error handling scopes around critical operations
ā
Test with real data, including edge cases
ā
Log important values to SharePoint list or file
ā
Use descriptive action names for easier debugging
ā
Add comments to complex logic
ā
Monitor flows regularly in Power Automate analytics
ā
Set up alerts for failed flows
ā
Version control: Export and save flow definitions
Key Takeaways
- Most errors are expression syntax, null values, or authentication
- Read error messages carefully ā they usually point to the issue
- Use safe navigation (
?) everywhere to prevent null errors - Test thoroughly with real data before deploying
- Add error handling with scopes and "Configure run after"
- Monitor flow runs and fix failures quickly
Conclusion
Power Automate errors are inevitable, but they don't have to be showstoppers. Armed with these troubleshooting techniques, you can diagnose and fix most issues in minutes instead of hours.
Build error handling into your flows from the start. Add null checks, configure retry policies, and use scopes for try-catch logic. Your flows will be more reliable, and you'll spend less time firefighting failures.
Related articles: Power Automate Email Approval Workflow, Zapier vs Power Automate vs Make Comparison
Sponsored Content
Interested in advertising? Reach automation professionals through our platform.
