agentsclimarketplace

N8n observability

Skill gabrielrdga/n8n-skills/skills/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

Install
npx -y skills add gabrielrdga/n8n-skills --skill n8n-observability

Assembled 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:

  1. Is it working? → Execution success rate
  2. Is it fast? → Execution duration trends
  3. Is it failing? → Error patterns and root causes
  4. 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 PatternLikely CauseFix
Connection timeoutExternal API down/slowAdd retry logic, increase timeout
401 UnauthorizedExpired/invalid credentialsRotate credentials
429 Rate LimitedToo many requestsAdd delay, use batch processing
Missing fieldInput data changedAdd null checks, data validation
Memory exceededProcessing too much dataUse SplitInBatches
Expression errorData structure mismatchAdd 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

ConditionSeverityAction
Error rate > 20% in 1 hour🔴 CriticalImmediate investigation
Error rate > 10% in 4 hours🟠 HighInvestigate within 4h
Avg duration > 3x baseline🟡 MediumPerformance review
0 executions in expected window🟡 MediumCheck trigger
New error type (first occurrence)🟡 MediumAnalyze 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

ProblemSolution
Slow API callsAdd caching, parallel requests
Large data processingUse SplitInBatches
Frequent timeoutsIncrease timeout, add retry
Rate limiting hitsAdd delay between requests
Memory issuesProcess in chunks, reduce payload

Troubleshooting Guide

Workflow Not Executing

  1. Check: Is workflow active? (n8n_get_workflow → active: true)
  2. Check: Is trigger configured correctly? (webhook path, schedule)
  3. Check: Instance health (n8n_health_check)
  4. Check: Execution history (any errors?)

Workflow Executing But Wrong Output

  1. Check: Input data structure (webhook .body nesting?)
  2. Check: Expression references (correct node names?)
  3. Check: Conditional logic (IF/Switch routing correct?)
  4. Debug: Add Code node with console.log at each step

Intermittent Failures

  1. Pattern: Same time daily? → Rate limit or scheduled conflict
  2. Pattern: Random timing? → External service instability
  3. Pattern: Increasing frequency? → Data volume growth
  4. 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

  1. Monitor → Track success rate, duration, errors
  2. Alert → Notify on thresholds (20% error rate = critical)
  3. Debug → Analyze error patterns, find root cause
  4. Optimize → Fix performance bottlenecks
  5. Report → Dashboard for ongoing health tracking

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.