Skip to main content

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 TestingWith Testing
Errors in productionIssues found early
Broken customer experiencesSmooth automations
Difficult debuggingClear error visibility
Unknown failuresConfident deployments

Testing Methods

MethodWhen to Use
Manual TestQuick validation with sample data
Node TestingTest individual nodes
Execution ReplayAnalyze past executions
Debug ModeStep-by-step inspection

Manual Testing

Running a Test

  1. Open your workflow in the builder
  2. Click Test in the toolbar
  3. Enter test input data:
{
"email": "test@example.com",
"name": "John Doe",
"message": "Hello, I need help"
}
  1. Click Run Test
  2. Watch execution in real-time

What to Observe

IndicatorMeaning
Green highlightNode executed successfully
Red highlightNode failed
Blue highlightCurrently executing
GrayNot 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

  1. Click on a specific node
  2. Click Run Node in properties panel
  3. Provide input data for that node
  4. 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

  1. Go to Automation → Workflows
  2. Click your workflow
  3. Open Executions tab
  4. See all workflow runs

Execution Details

ColumnDescription
IDUnique execution identifier
StatusCompleted, Failed, Running
TriggerWhat started the execution
StartedWhen it began
DurationHow long it took

Replaying Executions

  1. Click any execution
  2. Workflow loads with that execution's data
  3. See exact input/output for each node
  4. Identify where issues occurred

Debug Mode

Enabling Debug

Some nodes support debug mode:

  1. Click the node
  2. Enable Debug Mode toggle
  3. Run test
  4. 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 CaseTest Data
Empty valuesnull, "", []
Long strings1000+ character text
Special charactersUnicode, emojis, HTML
Large numbersIntegers, decimals, negatives
Date boundariesPast, 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:

  1. Typo in variable name
  2. Node hasn't executed yet
  3. Path is incorrect

Solutions:

  1. Check node alias matches
  2. Verify execution order
  3. Use debug mode to see available variables

Condition Always False

Symptom: Always takes false path

Causes:

  1. Type mismatch (string vs number)
  2. Case sensitivity
  3. Empty value comparison

Solutions:

  1. Check actual value in debug
  2. Use correct operator
  3. Handle null/undefined explicitly

API Node Fails

Symptom: External API call fails

Causes:

  1. Invalid credentials
  2. Rate limiting
  3. Incorrect URL/parameters

Solutions:

  1. Test integration separately
  2. Check API logs
  3. Verify request format

Loop Not Executing

Symptom: Loop shows 0 iterations

Causes:

  1. Array is empty
  2. Array path is wrong
  3. Data is not an array

Solutions:

  1. Print array value before loop
  2. Check array_source path
  3. 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

  1. Run workflow multiple times
  2. Note duration per node
  3. Optimize slowest nodes

Optimization Tips

IssueSolution
Slow LLMUse faster model
Many API callsBatch if possible
Large loopsAdd concurrency
Complex transformsSimplify 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:

  1. Error Handling - Build resilient workflows

Quick Reference

Test Input Structure

{
"trigger_field": "value",
"nested": {
"field": "value"
},
"array": [{"item": 1}]
}

Execution Status

StatusMeaning
PendingWaiting to start
RunningCurrently executing
CompletedFinished successfully
FailedError occurred

Debug Checklist

☐ Check input data format
☐ Verify variable paths
☐ Review node configuration
☐ Enable debug mode
☐ Check execution logs
☐ Test each node individually