N8n observability
Post-deployment monitoring and troubleshooting. Use when monitoring workflow executions, debugging runtime errors, analyzing execution patterns, setting up alerts, or troubleshooting performance issues in production workflows.From its SKILL.md
npx -y skills add gabrielrdga/n8n-skills --skill n8n-observabilityAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
8.2 KB, as published. Nobody here has run it
n8n Observability
Post-deployment monitoring, alerting, and troubleshooting for n8n workflows.
Monitoring Overview
After deploying a workflow, observability answers:
- Is it working? → Execution success rate
- Is it fast? → Execution duration trends
- Is it failing? → Error patterns and root causes
- Is it healthy? → Overall instance health
Execution Monitoring
Check Recent Executions
// Get last 20 executions for a workflow
const executions = await n8n_executions({
workflowId: "workflow-id",
limit: 20,
status: "all" // "success" | "error" | "all"
});
// Calculate metrics
const total = executions.length;
const success = executions.filter(e => e.status === "success").length;
const errors = executions.filter(e => e.status === "error").length;
const successRate = (success / total * 100).toFixed(1);
const avgDuration = executions.reduce((s, e) =>
s + (e.executionTime || 0), 0) / total;
console.log(`Success Rate: ${successRate}%`);
console.log(`Avg Duration: ${avgDuration}ms`);
console.log(`Errors: ${errors}/${total}`);
Health Dashboard Format
WORKFLOW HEALTH DASHBOARD
══════════════════════════════════════
Workflow: "Order Processing Pipeline"
Period: Last 24 hours
METRICS
───────────────────────────────────
Executions: 142
Success Rate: 97.2% ✅
Avg Duration: 1,243ms
P95 Duration: 3,890ms
Error Count: 4
ERROR BREAKDOWN
───────────────────────────────────
2x "Connection timeout: Shopify API" (Node: HTTP Request)
1x "Missing field: customer.email" (Node: Code)
1x "Rate limited: Slack API" (Node: Slack)
TRENDS
───────────────────────────────────
Success Rate: 97.2% (↑ from 95.1% yesterday)
Avg Duration: 1,243ms (↓ from 1,567ms yesterday)
Volume: 142 (↑ from 128 yesterday)
Error Analysis
Common Runtime Error Patterns
| Error Pattern | Likely Cause | Fix |
|---|---|---|
| Connection timeout | External API down/slow | Add retry logic, increase timeout |
| 401 Unauthorized | Expired/invalid credentials | Rotate credentials |
| 429 Rate Limited | Too many requests | Add delay, use batch processing |
| Missing field | Input data changed | Add null checks, data validation |
| Memory exceeded | Processing too much data | Use SplitInBatches |
| Expression error | Data structure mismatch | Add safe access patterns |
Debugging a Failed Execution
// Step 1: Get the failed execution details
const executions = await n8n_executions({
workflowId: "workflow-id",
status: "error",
limit: 5
});
// Step 2: Analyze error details
for (const exec of executions) {
console.log(`Execution: ${exec.id}`);
console.log(`Error: ${exec.error?.message}`);
console.log(`Failed Node: ${exec.error?.node}`);
console.log(`Timestamp: ${exec.startedAt}`);
}
// Step 3: Check if it's a pattern
// Same error on same node? → Configuration issue
// Random errors? → External service issue
// Increasing errors? → Data volume issue
Alerting Rules
When to Alert
| Condition | Severity | Action |
|---|---|---|
| Error rate > 20% in 1 hour | 🔴 Critical | Immediate investigation |
| Error rate > 10% in 4 hours | 🟠 High | Investigate within 4h |
| Avg duration > 3x baseline | 🟡 Medium | Performance review |
| 0 executions in expected window | 🟡 Medium | Check trigger |
| New error type (first occurrence) | 🟡 Medium | Analyze pattern |
Alert Implementation Pattern
// Code node in a monitoring workflow
const workflowId = "target-workflow-id";
const timeWindow = 60; // minutes
const executions = await n8n_executions({
workflowId,
limit: 100
});
// Filter to time window
const recent = executions.filter(e => {
const age = (Date.now() - new Date(e.startedAt)) / 60000;
return age <= timeWindow;
});
const errorRate = recent.filter(e =>
e.status === "error"
).length / recent.length;
if (errorRate > 0.2) {
// Send alert via Slack/email
return [{
json: {
alert: "HIGH_ERROR_RATE",
workflow: workflowId,
errorRate: `${(errorRate * 100).toFixed(1)}%`,
period: `${timeWindow} minutes`,
action: "Investigate immediately"
}
}];
}
return []; // No alert
Instance Health Check
// Overall instance health
const health = await n8n_health_check({ mode: "diagnostic" });
// Workflow inventory
const workflows = await n8n_list_workflows();
const active = workflows.filter(w => w.active);
const inactive = workflows.filter(w => !w.active);
console.log(`Total Workflows: ${workflows.length}`);
console.log(`Active: ${active.length}`);
console.log(`Inactive: ${inactive.length}`);
// Check for stale workflows (active but no recent executions)
for (const wf of active) {
const execs = await n8n_executions({
workflowId: wf.id,
limit: 1
});
if (execs.length === 0) {
console.log(`⚠️ Active but never executed: ${wf.name}`);
}
}
Performance Optimization
Identifying Slow Workflows
const executions = await n8n_executions({
workflowId: "workflow-id",
limit: 50,
status: "success"
});
const durations = executions.map(e => e.executionTime);
const p50 = percentile(durations, 50);
const p95 = percentile(durations, 95);
const p99 = percentile(durations, 99);
// If P95 > 3x P50, there are outlier slow runs
if (p95 > p50 * 3) {
console.log("⚠️ High variance in execution time");
console.log("Consider: batch processing, caching, timeout settings");
}
Common Optimization Strategies
| Problem | Solution |
|---|---|
| Slow API calls | Add caching, parallel requests |
| Large data processing | Use SplitInBatches |
| Frequent timeouts | Increase timeout, add retry |
| Rate limiting hits | Add delay between requests |
| Memory issues | Process in chunks, reduce payload |
Troubleshooting Guide
Workflow Not Executing
- Check: Is workflow active? (
n8n_get_workflow → active: true) - Check: Is trigger configured correctly? (webhook path, schedule)
- Check: Instance health (
n8n_health_check) - Check: Execution history (any errors?)
Workflow Executing But Wrong Output
- Check: Input data structure (webhook
.bodynesting?) - Check: Expression references (correct node names?)
- Check: Conditional logic (IF/Switch routing correct?)
- Debug: Add Code node with console.log at each step
Intermittent Failures
- Pattern: Same time daily? → Rate limit or scheduled conflict
- Pattern: Random timing? → External service instability
- Pattern: Increasing frequency? → Data volume growth
- Action: Add retry logic and error notifications
Best Practices
✅ Do
- Monitor execution success rate daily
- Set up alerts for error rate spikes
- Track duration trends for performance degradation
- Review error patterns weekly
- Keep execution logs for debugging
❌ Don't
- Deploy without monitoring plan
- Ignore intermittent errors
- Keep "save all executions" on high-volume workflows
- Wait for users to report failures
- Skip post-deployment monitoring
Related Skills
- n8n-publish-gate — Post-activation monitoring
- n8n-test-gate — Pre-deployment testing
- n8n-audit-compliance — Security monitoring
- n8n-builder-orchestrator — Integrates monitoring into lifecycle
- n8n-mcp-tools-expert — n8n_executions and health_check tools
Summary
Observability = Know before users complain
- Monitor → Track success rate, duration, errors
- Alert → Notify on thresholds (20% error rate = critical)
- Debug → Analyze error patterns, find root cause
- Optimize → Fix performance bottlenecks
- Report → Dashboard for ongoing health tracking