Diagnose and fix Flow execution failures using logs, error patterns, and debugging techniques.
Identifying the problem
- Go to Logs
- Filter by Status: Failed
- Click the failed execution
- Review error details
Common Flow failures
Invalid JSON in request body
Error: Unexpected token in JSON at position X
Cause: Malformed JSON in API call or transform step
Fix:
- Validate JSON syntax (remove trailing commas, quote strings)
- Use JSON.stringify() in transform steps
- Test with online JSON validator
Missing required parameter
Error: Missing required field: {fieldName}
Cause: Flow input missing expected field
Fix:
- Add validation at Flow start
- Provide default values:
{{input.field || "default"}}
- Update callers to include required fields
API call returns 500 error
Error: External API returned 500
Cause: Third-party API encountered server error
Fix:
- Add retry logic with delay steps
- Implement error handling and fallback responses
- Contact API provider if persistent
Record not found
Error: No Record found matching criteria
Cause: Retrieve Record step found no match
Fix:
- Add conditional check:
{{retrieveRecord.output != null}}
- Provide fallback behavior in else branch
- Verify lookup field and value are correct
Error: ReferenceError: X is not defined
Cause: JavaScript syntax error in transform step
Fix:
- Check variable spelling and scope
- Use
const or let to declare variables
- Test transform logic in isolation
Debugging workflow
- Identify failing step: Check logs to see which step failed
- Review input: Inspect data passed to that step
- Test in isolation: Run Flow with test data that triggers error
- Add logging: Use transform steps with console.log() to inspect values
- Fix and verify: Update Flow, test, publish
Preventing failures
Add validation at Flow start:
Test Flows with edge cases: empty inputs, null values, invalid data, API failures. Proactive testing prevents production failures.
When errors are expected
Some failures are normal and should be handled, not prevented:
- User provides invalid input → Return clear error message
- External API temporarily down → Retry or queue for later
- Record doesn’t exist → Create new Record or use defaults
Design Flows to handle these scenarios gracefully.
Next steps
- Debugging flows for detailed debugging techniques
- Debugging failed executions for production troubleshooting
- Viewing execution logs to access error details
- Common errors and solutions for quick reference