Testing Workflows
Test and debug your workflows to ensure they work correctly before activating them for production use.
Time to complete: 15 minutes
Why Test Workflows?
Testing catches issues before they affect real users:
| Without Testing | With Testing |
|---|---|
| Errors in production | Issues found early |
| Broken customer experiences | Smooth automations |
| Difficult debugging | Clear error visibility |
| Unknown failures | Confident deployments |
Testing Methods
| Method | When to Use |
|---|---|
| Manual Test | Quick validation with sample data |
| Node Testing | Test individual nodes |
| Execution Replay | Analyze past executions |
| Debug Mode | Step-by-step inspection |
Manual Testing
Running a Test
- Open your workflow in the builder
- Click Test in the toolbar
- Enter test input data:
{
"email": "test@example.com",
"name": "John Doe",
"message": "Hello, I need help"
}
- Click Run Test
- Watch execution in real-time
What to Observe
| Indicator | Meaning |
|---|---|
| Green highlight | Node executed successfully |
| Red highlight | Node failed |
| Blue highlight | Currently executing |
| Gray | Not yet executed |
Viewing Node Results
Click any node during or after test to see:
- Input: Data received by node
- Output: Data produced by node
- Duration: How long it took
- Error: Any error message
Test Input Formats
Webhook Trigger Input
{
"payload": {
"customer_id": "cust_123",
"order_id": "ord_456",
"items": [
{"name": "Product A", "qty": 2},
{"name": "Product B", "qty": 1}
]
},
"headers": {
"Content-Type": "application/json",
"X-API-Key": "test-key"
}
}
Database Trigger Input
{
"entity_id": "550e8400-e29b-41d4-a716-446655440000",
"entity_type": "contacts",
"operation": "INSERT",
"new_data": {
"first_name": "Jane",
"last_name": "Smith",
"email": "jane@example.com",
"lead_score": 85
},
"old_data": null,
"changed_fields": ["first_name", "last_name", "email", "lead_score"]
}
User Message Trigger Input
{
"message": "What are your business hours?",
"user_id": "user_123",
"conversation_id": "conv_456",
"context": {
"previous_messages": ["Hi", "I have a question"]
}
}
Scheduler Trigger Input
{
"triggered_at": "2024-03-15T09:00:00Z",
"schedule_type": "daily",
"iteration": 1
}
Node-Level Testing
Run Single Node
- Click on a specific node
- Click Run Node in properties panel
- Provide input data for that node
- See output immediately
When to Use
- Testing node configuration
- Debugging specific logic
- Validating transformations
- Checking integrations
Example: Test Transform Node
Input:
{
"raw_data": {
"firstName": "John",
"lastName": "Doe",
"email": "JOHN@EXAMPLE.COM"
}
}
Transform Code:
return {
full_name: `${input.raw_data.firstName} ${input.raw_data.lastName}`,
email: input.raw_data.email.toLowerCase(),
created_at: new Date().toISOString()
};
Expected Output:
{
"full_name": "John Doe",
"email": "john@example.com",
"created_at": "2024-03-15T10:30:00.000Z"
}
Execution History
Viewing Past Executions
- Go to Automation → Workflows
- Click your workflow
- Open Executions tab
- See all workflow runs
Execution Details
| Column | Description |
|---|---|
| ID | Unique execution identifier |
| Status | Completed, Failed, Running |
| Trigger | What started the execution |
| Started | When it began |
| Duration | How long it took |
Replaying Executions
- Click any execution
- Workflow loads with that execution's data
- See exact input/output for each node
- Identify where issues occurred
Debug Mode
Enabling Debug
Some nodes support debug mode:
- Click the node
- Enable Debug Mode toggle
- Run test
- See detailed execution info
Debug Information
Debug mode shows:
- Variable resolution steps
- Condition evaluation details
- API request/response logs
- Timing breakdowns
- Memory usage
Example Debug Output
{
"debug": {
"prompt_length": 245,
"system_prompt_length": 120,
"input_keys": ["message", "contact", "context"],
"variable_resolution": {
"{{contact.name}}": "John Doe",
"{{message}}": "Hello"
},
"execution_time_ms": 1234
}
}
Common Testing Scenarios
Testing Conditions
Test True Path:
{
"lead_score": 90,
"company_size": "Enterprise"
}
Test False Path:
{
"lead_score": 30,
"company_size": "Startup"
}
Testing Loops
{
"items": [
{"id": 1, "name": "Item A"},
{"id": 2, "name": "Item B"},
{"id": 3, "name": "Item C"}
]
}
Verify:
- All items processed
- Results collected correctly
- Error handling works (add invalid item)
Testing Error Paths
{
"email": null,
"required_field": ""
}
Verify:
- Error conditions trigger
- Error handlers execute
- Appropriate responses sent
Testing AI Nodes
{
"message": "What is your return policy?",
"kb_id": "your-kb-id"
}
Check:
- KB search returns results
- AI generates relevant answer
- Response format is correct
Test Data Best Practices
Use Realistic Data
✅ Real-looking names and emails
✅ Valid data formats
✅ Typical data volumes
✅ Edge cases included
❌ Don't use "test" everywhere
❌ Don't skip optional fields
❌ Don't ignore special characters
Test Edge Cases
| Edge Case | Test Data |
|---|---|
| Empty values | null, "", [] |
| Long strings | 1000+ character text |
| Special characters | Unicode, emojis, HTML |
| Large numbers | Integers, decimals, negatives |
| Date boundaries | Past, future, midnight |
Document Test Cases
Create a test plan:
## Test Cases for Welcome Email Workflow
1. **Happy Path**
- Valid email and name
- Expected: Email sent successfully
2. **Missing Email**
- No email provided
- Expected: Error response
3. **Invalid Email Format**
- Email: "not-an-email"
- Expected: Validation error
4. **Special Characters in Name**
- Name: "José García-López"
- Expected: Handles correctly
Troubleshooting Common Issues
Variable Not Found
Symptom: {{variable}} not found in output
Causes:
- Typo in variable name
- Node hasn't executed yet
- Path is incorrect
Solutions:
- Check node alias matches
- Verify execution order
- Use debug mode to see available variables
Condition Always False
Symptom: Always takes false path
Causes:
- Type mismatch (string vs number)
- Case sensitivity
- Empty value comparison
Solutions:
- Check actual value in debug
- Use correct operator
- Handle null/undefined explicitly
API Node Fails
Symptom: External API call fails
Causes:
- Invalid credentials
- Rate limiting
- Incorrect URL/parameters
Solutions:
- Test integration separately
- Check API logs
- Verify request format
Loop Not Executing
Symptom: Loop shows 0 iterations
Causes:
- Array is empty
- Array path is wrong
- Data is not an array
Solutions:
- Print array value before loop
- Check array_source path
- Wrap in array if single item
Performance Testing
Monitor Execution Time
Watch for slow nodes:
- LLM calls: Expect 1-5 seconds
- API requests: Depends on external service
- Database queries: Should be < 1 second
- Transforms: Should be milliseconds
Identify Bottlenecks
- Run workflow multiple times
- Note duration per node
- Optimize slowest nodes
Optimization Tips
| Issue | Solution |
|---|---|
| Slow LLM | Use faster model |
| Many API calls | Batch if possible |
| Large loops | Add concurrency |
| Complex transforms | Simplify logic |
Pre-Activation Checklist
Before activating a workflow, verify:
☐ Happy path works correctly
☐ Error paths handle failures gracefully
☐ All conditions tested (true and false)
☐ Edge cases don't break workflow
☐ Performance is acceptable
☐ Outputs are correctly formatted
☐ Integrations are connected
☐ Variables resolve properly
☐ No sensitive data in logs
☐ Proper error messages for users
Next Steps
With testing mastered, continue with:
- Error Handling - Build resilient workflows
Quick Reference
Test Input Structure
{
"trigger_field": "value",
"nested": {
"field": "value"
},
"array": [{"item": 1}]
}
Execution Status
| Status | Meaning |
|---|---|
| Pending | Waiting to start |
| Running | Currently executing |
| Completed | Finished successfully |
| Failed | Error occurred |
Debug Checklist
☐ Check input data format
☐ Verify variable paths
☐ Review node configuration
☐ Enable debug mode
☐ Check execution logs
☐ Test each node individually