Flow execution failures
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:
{{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: Record not found
Cause: A Get Record step found no match (Get Record fails when nothing matches; List Records returns an empty array instead unless you set its On empty option to Fail)
Fix:
- For Get Record, add a conditional check:
{{getRecord.output != null}}, or set the step’s error handling to continue on error - For List Records, check
{{listRecords.output.length}} > 0instead of a null check - Provide fallback behavior in the else branch
- Verify the lookup field and value are correct
Transform step JavaScript error
Error: ReferenceError: X is not defined
Cause: JavaScript syntax error in transform step
Fix:
- Check variable spelling and scope
- Use
constorletto 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
Input validation
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
- Working with Logs for production troubleshooting
- Common errors and solutions for quick reference