{
  "schemaVersion": "1.0",
  "item": {
    "slug": "n8n",
    "name": "n8n",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/thomasansems/n8n",
    "canonicalUrl": "https://clawhub.ai/thomasansems/n8n",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/n8n",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=n8n",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "scripts/n8n_optimizer.py",
      "scripts/n8n_tester.py",
      "scripts/n8n_api.py",
      "references/api.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/n8n"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/n8n",
    "agentPageUrl": "https://openagent3.xyz/skills/n8n/agent",
    "manifestUrl": "https://openagent3.xyz/skills/n8n/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/n8n/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "n8n Workflow Management",
        "body": "Comprehensive workflow automation management for n8n platform with creation, testing, execution monitoring, and performance optimization capabilities."
      },
      {
        "title": "⚠️ CRITICAL: Workflow Creation Rules",
        "body": "When creating n8n workflows, ALWAYS:\n\n✅ Generate COMPLETE workflows with all functional nodes\n✅ Include actual HTTP Request nodes for API calls (ImageFX, Gemini, Veo, Suno, etc.)\n✅ Add Code nodes for data transformation and logic\n✅ Create proper connections between all nodes\n✅ Use real node types (n8n-nodes-base.httpRequest, n8n-nodes-base.code, n8n-nodes-base.set)\n\nNEVER:\n\n❌ Create \"Setup Instructions\" placeholder nodes\n❌ Generate workflows with only TODO comments\n❌ Make incomplete workflows requiring manual node addition\n❌ Use text-only nodes as substitutes for real functionality\n\nExample GOOD workflow:\n\nManual Trigger → Set Config → HTTP Request (API call) → Code (parse) → Response\n\nExample BAD workflow:\n\nManual Trigger → Code (\"Add HTTP nodes here, configure APIs...\")\n\nAlways build the complete, functional workflow with all necessary nodes configured and connected."
      },
      {
        "title": "Setup",
        "body": "Required environment variables:\n\nN8N_API_KEY — Your n8n API key (Settings → API in the n8n UI)\nN8N_BASE_URL — Your n8n instance URL\n\nConfigure credentials via OpenClaw settings:\n\nAdd to ~/.config/openclaw/settings.json:\n\n{\n  \"skills\": {\n    \"n8n\": {\n      \"env\": {\n        \"N8N_API_KEY\": \"your-api-key-here\",\n        \"N8N_BASE_URL\": \"your-n8n-url-here\"\n      }\n    }\n  }\n}\n\nOr set per-session (do not persist secrets in shell rc files):\n\nexport N8N_API_KEY=\"your-api-key-here\"\nexport N8N_BASE_URL=\"your-n8n-url-here\"\n\nVerify connection:\n\npython3 scripts/n8n_api.py list-workflows --pretty\n\nSecurity note: Never store API keys in plaintext shell config files (~/.bashrc, ~/.zshrc). Use the OpenClaw settings file or a secure secret manager."
      },
      {
        "title": "Workflow Management",
        "body": "List Workflows\n\npython3 scripts/n8n_api.py list-workflows --pretty\npython3 scripts/n8n_api.py list-workflows --active true --pretty\n\nGet Workflow Details\n\npython3 scripts/n8n_api.py get-workflow --id <workflow-id> --pretty\n\nCreate Workflows\n\n# From JSON file\npython3 scripts/n8n_api.py create --from-file workflow.json\n\nActivate/Deactivate\n\npython3 scripts/n8n_api.py activate --id <workflow-id>\npython3 scripts/n8n_api.py deactivate --id <workflow-id>"
      },
      {
        "title": "Testing & Validation",
        "body": "Validate Workflow Structure\n\n# Validate existing workflow\npython3 scripts/n8n_tester.py validate --id <workflow-id>\n\n# Validate from file\npython3 scripts/n8n_tester.py validate --file workflow.json --pretty\n\n# Generate validation report\npython3 scripts/n8n_tester.py report --id <workflow-id>\n\nDry Run Testing\n\n# Test with data\npython3 scripts/n8n_tester.py dry-run --id <workflow-id> --data '{\"email\": \"test@example.com\"}'\n\n# Test with data file\npython3 scripts/n8n_tester.py dry-run --id <workflow-id> --data-file test-data.json\n\n# Full test report (validation + dry run)\npython3 scripts/n8n_tester.py dry-run --id <workflow-id> --data-file test.json --report\n\nTest Suite\n\n# Run multiple test cases\npython3 scripts/n8n_tester.py test-suite --id <workflow-id> --test-suite test-cases.json"
      },
      {
        "title": "Execution Monitoring",
        "body": "List Executions\n\n# Recent executions (all workflows)\npython3 scripts/n8n_api.py list-executions --limit 10 --pretty\n\n# Specific workflow executions\npython3 scripts/n8n_api.py list-executions --id <workflow-id> --limit 20 --pretty\n\nGet Execution Details\n\npython3 scripts/n8n_api.py get-execution --id <execution-id> --pretty\n\nManual Execution\n\n# Trigger workflow\npython3 scripts/n8n_api.py execute --id <workflow-id>\n\n# Execute with data\npython3 scripts/n8n_api.py execute --id <workflow-id> --data '{\"key\": \"value\"}'"
      },
      {
        "title": "Performance Optimization",
        "body": "Analyze Performance\n\n# Full performance analysis\npython3 scripts/n8n_optimizer.py analyze --id <workflow-id> --pretty\n\n# Analyze specific period\npython3 scripts/n8n_optimizer.py analyze --id <workflow-id> --days 30 --pretty\n\nGet Optimization Suggestions\n\n# Priority-ranked suggestions\npython3 scripts/n8n_optimizer.py suggest --id <workflow-id> --pretty\n\nGenerate Optimization Report\n\n# Human-readable report with metrics, bottlenecks, and suggestions\npython3 scripts/n8n_optimizer.py report --id <workflow-id>\n\nGet Workflow Statistics\n\n# Execution statistics\npython3 scripts/n8n_api.py stats --id <workflow-id> --days 7 --pretty"
      },
      {
        "title": "Basic Usage",
        "body": "from scripts.n8n_api import N8nClient\n\nclient = N8nClient()\n\n# List workflows\nworkflows = client.list_workflows(active=True)\n\n# Get workflow\nworkflow = client.get_workflow('workflow-id')\n\n# Create workflow\nnew_workflow = client.create_workflow({\n    'name': 'My Workflow',\n    'nodes': [...],\n    'connections': {...}\n})\n\n# Activate/deactivate\nclient.activate_workflow('workflow-id')\nclient.deactivate_workflow('workflow-id')\n\n# Executions\nexecutions = client.list_executions(workflow_id='workflow-id', limit=10)\nexecution = client.get_execution('execution-id')\n\n# Execute workflow\nresult = client.execute_workflow('workflow-id', data={'key': 'value'})"
      },
      {
        "title": "Validation & Testing",
        "body": "from scripts.n8n_api import N8nClient\nfrom scripts.n8n_tester import WorkflowTester\n\nclient = N8nClient()\ntester = WorkflowTester(client)\n\n# Validate workflow\nvalidation = tester.validate_workflow(workflow_id='123')\nprint(f\"Valid: {validation['valid']}\")\nprint(f\"Errors: {validation['errors']}\")\nprint(f\"Warnings: {validation['warnings']}\")\n\n# Dry run\nresult = tester.dry_run(\n    workflow_id='123',\n    test_data={'email': 'test@example.com'}\n)\nprint(f\"Status: {result['status']}\")\n\n# Test suite\ntest_cases = [\n    {'name': 'Test 1', 'input': {...}, 'expected': {...}},\n    {'name': 'Test 2', 'input': {...}, 'expected': {...}}\n]\nresults = tester.test_suite('123', test_cases)\nprint(f\"Passed: {results['passed']}/{results['total_tests']}\")\n\n# Generate report\nreport = tester.generate_test_report(validation, result)\nprint(report)"
      },
      {
        "title": "Performance Optimization",
        "body": "from scripts.n8n_optimizer import WorkflowOptimizer\n\noptimizer = WorkflowOptimizer()\n\n# Analyze performance\nanalysis = optimizer.analyze_performance('workflow-id', days=7)\nprint(f\"Performance Score: {analysis['performance_score']}/100\")\nprint(f\"Health: {analysis['execution_metrics']['health']}\")\n\n# Get suggestions\nsuggestions = optimizer.suggest_optimizations('workflow-id')\nprint(f\"Priority Actions: {len(suggestions['priority_actions'])}\")\nprint(f\"Quick Wins: {len(suggestions['quick_wins'])}\")\n\n# Generate report\nreport = optimizer.generate_optimization_report(analysis)\nprint(report)"
      },
      {
        "title": "1. Validate and Test Workflow",
        "body": "# Validate workflow structure\npython3 scripts/n8n_tester.py validate --id <workflow-id> --pretty\n\n# Test with sample data\npython3 scripts/n8n_tester.py dry-run --id <workflow-id> \\\n  --data '{\"email\": \"test@example.com\", \"name\": \"Test User\"}'\n\n# If tests pass, activate\npython3 scripts/n8n_api.py activate --id <workflow-id>"
      },
      {
        "title": "2. Debug Failed Workflow",
        "body": "# Check recent executions\npython3 scripts/n8n_api.py list-executions --id <workflow-id> --limit 10 --pretty\n\n# Get specific execution details\npython3 scripts/n8n_api.py get-execution --id <execution-id> --pretty\n\n# Validate workflow structure\npython3 scripts/n8n_tester.py validate --id <workflow-id>\n\n# Generate test report\npython3 scripts/n8n_tester.py report --id <workflow-id>\n\n# Check for optimization issues\npython3 scripts/n8n_optimizer.py report --id <workflow-id>"
      },
      {
        "title": "3. Optimize Workflow Performance",
        "body": "# Analyze current performance\npython3 scripts/n8n_optimizer.py analyze --id <workflow-id> --days 30 --pretty\n\n# Get actionable suggestions\npython3 scripts/n8n_optimizer.py suggest --id <workflow-id> --pretty\n\n# Generate comprehensive report\npython3 scripts/n8n_optimizer.py report --id <workflow-id>\n\n# Review execution statistics\npython3 scripts/n8n_api.py stats --id <workflow-id> --days 30 --pretty\n\n# Test optimizations with dry run\npython3 scripts/n8n_tester.py dry-run --id <workflow-id> --data-file test-data.json"
      },
      {
        "title": "4. Monitor Workflow Health",
        "body": "# Check active workflows\npython3 scripts/n8n_api.py list-workflows --active true --pretty\n\n# Review recent execution status\npython3 scripts/n8n_api.py list-executions --limit 20 --pretty\n\n# Get statistics for each critical workflow\npython3 scripts/n8n_api.py stats --id <workflow-id> --pretty\n\n# Generate health reports\npython3 scripts/n8n_optimizer.py report --id <workflow-id>"
      },
      {
        "title": "Validation Checks",
        "body": "The testing module performs comprehensive validation:"
      },
      {
        "title": "Structure Validation",
        "body": "✓ Required fields present (nodes, connections)\n✓ All nodes have names and types\n✓ Connection targets exist\n✓ No disconnected nodes (warning)"
      },
      {
        "title": "Configuration Validation",
        "body": "✓ Nodes requiring credentials are configured\n✓ Required parameters are set\n✓ HTTP nodes have URLs\n✓ Webhook nodes have paths\n✓ Email nodes have content"
      },
      {
        "title": "Flow Validation",
        "body": "✓ Workflow has trigger nodes\n✓ Proper execution flow\n✓ No circular dependencies\n✓ End nodes identified"
      },
      {
        "title": "Optimization Analysis",
        "body": "The optimizer analyzes multiple dimensions:"
      },
      {
        "title": "Execution Metrics",
        "body": "Total executions\nSuccess/failure rates\nHealth status (excellent/good/fair/poor)\nError patterns"
      },
      {
        "title": "Performance Metrics",
        "body": "Node count and complexity\nConnection patterns\nExpensive operations (API calls, database queries)\nParallel execution opportunities"
      },
      {
        "title": "Bottleneck Detection",
        "body": "Sequential expensive operations\nHigh failure rates\nMissing error handling\nRate limit issues"
      },
      {
        "title": "Optimization Opportunities",
        "body": "Parallel Execution: Identify nodes that can run concurrently\nCaching: Suggest caching for repeated API calls\nBatch Processing: Recommend batching for large datasets\nError Handling: Add error recovery mechanisms\nComplexity Reduction: Split complex workflows\nTimeout Settings: Configure execution limits"
      },
      {
        "title": "Performance Scoring",
        "body": "Workflows receive a performance score (0-100) based on:\n\nSuccess Rate: Higher is better (50% weight)\nComplexity: Lower is better (30% weight)\nBottlenecks: Fewer is better (critical: -20, high: -10, medium: -5)\nOptimizations: Implemented best practices (+5 each)\n\nScore interpretation:\n\n90-100: Excellent - Well-optimized\n70-89: Good - Minor improvements possible\n50-69: Fair - Optimization recommended\n0-49: Poor - Significant issues"
      },
      {
        "title": "Development",
        "body": "Plan Structure: Design workflow nodes and connections before building\nValidate First: Always validate before deployment\nTest Thoroughly: Use dry-run with multiple test cases\nError Handling: Add error nodes for reliability\nDocumentation: Comment complex logic in Code nodes"
      },
      {
        "title": "Testing",
        "body": "Sample Data: Create realistic test data files\nEdge Cases: Test boundary conditions and errors\nIncremental: Test each node addition\nRegression: Retest after changes\nProduction-like: Use staging environment that mirrors production"
      },
      {
        "title": "Deployment",
        "body": "Inactive First: Deploy workflows in inactive state\nGradual Rollout: Test with limited traffic initially\nMonitor Closely: Watch first executions carefully\nQuick Rollback: Be ready to deactivate if issues arise\nDocument Changes: Keep changelog of modifications"
      },
      {
        "title": "Optimization",
        "body": "Baseline Metrics: Capture performance before changes\nOne Change at a Time: Isolate optimization impacts\nMeasure Results: Compare before/after metrics\nRegular Reviews: Schedule monthly optimization reviews\nCost Awareness: Monitor API usage and execution costs"
      },
      {
        "title": "Maintenance",
        "body": "Health Checks: Weekly execution statistics review\nError Analysis: Investigate failure patterns\nPerformance Monitoring: Track execution times\nCredential Rotation: Update credentials regularly\nCleanup: Archive or delete unused workflows"
      },
      {
        "title": "Authentication Error",
        "body": "Error: N8N_API_KEY not found in environment\n\nSolution: Set environment variable:\n\nexport N8N_API_KEY=\"your-api-key\""
      },
      {
        "title": "Connection Error",
        "body": "Error: HTTP 401: Unauthorized\n\nSolution:\n\nVerify API key is correct\nCheck N8N_BASE_URL is set correctly\nConfirm API access is enabled in n8n"
      },
      {
        "title": "Validation Errors",
        "body": "Validation failed: Node missing 'name' field\n\nSolution: Check workflow JSON structure, ensure all required fields present"
      },
      {
        "title": "Execution Timeout",
        "body": "Status: timeout - Execution did not complete\n\nSolution:\n\nCheck workflow for infinite loops\nReduce dataset size for testing\nOptimize expensive operations\nSet execution timeout in workflow settings"
      },
      {
        "title": "Rate Limiting",
        "body": "Error: HTTP 429: Too Many Requests\n\nSolution:\n\nAdd Wait nodes between API calls\nImplement exponential backoff\nUse batch processing\nCheck API rate limits"
      },
      {
        "title": "Missing Credentials",
        "body": "Warning: Node 'HTTP_Request' may require credentials\n\nSolution:\n\nConfigure credentials in n8n UI\nAssign credentials to node\nTest connection before activating"
      },
      {
        "title": "File Structure",
        "body": "~/clawd/skills/n8n/\n├── SKILL.md                    # This file\n├── scripts/\n│   ├── n8n_api.py             # Core API client (extended)\n│   ├── n8n_tester.py          # Testing & validation\n│   └── n8n_optimizer.py       # Performance optimization\n└── references/\n    └── api.md                 # n8n API reference"
      },
      {
        "title": "API Reference",
        "body": "For detailed n8n REST API documentation, see references/api.md or visit:\nhttps://docs.n8n.io/api/"
      },
      {
        "title": "Support",
        "body": "Documentation:\n\nn8n Official Docs: https://docs.n8n.io\nn8n Community Forum: https://community.n8n.io\nn8n API Reference: https://docs.n8n.io/api/\n\nDebugging:\n\nUse validation: python3 scripts/n8n_tester.py validate --id <workflow-id>\nCheck execution logs: python3 scripts/n8n_api.py get-execution --id <execution-id>\nReview optimization report: python3 scripts/n8n_optimizer.py report --id <workflow-id>\nTest with dry-run: python3 scripts/n8n_tester.py dry-run --id <workflow-id> --data-file test.json"
      }
    ],
    "body": "n8n Workflow Management\n\nComprehensive workflow automation management for n8n platform with creation, testing, execution monitoring, and performance optimization capabilities.\n\n⚠️ CRITICAL: Workflow Creation Rules\n\nWhen creating n8n workflows, ALWAYS:\n\n✅ Generate COMPLETE workflows with all functional nodes\n✅ Include actual HTTP Request nodes for API calls (ImageFX, Gemini, Veo, Suno, etc.)\n✅ Add Code nodes for data transformation and logic\n✅ Create proper connections between all nodes\n✅ Use real node types (n8n-nodes-base.httpRequest, n8n-nodes-base.code, n8n-nodes-base.set)\n\nNEVER:\n\n❌ Create \"Setup Instructions\" placeholder nodes\n❌ Generate workflows with only TODO comments\n❌ Make incomplete workflows requiring manual node addition\n❌ Use text-only nodes as substitutes for real functionality\n\nExample GOOD workflow:\n\nManual Trigger → Set Config → HTTP Request (API call) → Code (parse) → Response\n\n\nExample BAD workflow:\n\nManual Trigger → Code (\"Add HTTP nodes here, configure APIs...\")\n\n\nAlways build the complete, functional workflow with all necessary nodes configured and connected.\n\nSetup\n\nRequired environment variables:\n\nN8N_API_KEY — Your n8n API key (Settings → API in the n8n UI)\nN8N_BASE_URL — Your n8n instance URL\n\nConfigure credentials via OpenClaw settings:\n\nAdd to ~/.config/openclaw/settings.json:\n\n{\n  \"skills\": {\n    \"n8n\": {\n      \"env\": {\n        \"N8N_API_KEY\": \"your-api-key-here\",\n        \"N8N_BASE_URL\": \"your-n8n-url-here\"\n      }\n    }\n  }\n}\n\n\nOr set per-session (do not persist secrets in shell rc files):\n\nexport N8N_API_KEY=\"your-api-key-here\"\nexport N8N_BASE_URL=\"your-n8n-url-here\"\n\n\nVerify connection:\n\npython3 scripts/n8n_api.py list-workflows --pretty\n\n\nSecurity note: Never store API keys in plaintext shell config files (~/.bashrc, ~/.zshrc). Use the OpenClaw settings file or a secure secret manager.\n\nQuick Reference\nWorkflow Management\nList Workflows\npython3 scripts/n8n_api.py list-workflows --pretty\npython3 scripts/n8n_api.py list-workflows --active true --pretty\n\nGet Workflow Details\npython3 scripts/n8n_api.py get-workflow --id <workflow-id> --pretty\n\nCreate Workflows\n# From JSON file\npython3 scripts/n8n_api.py create --from-file workflow.json\n\nActivate/Deactivate\npython3 scripts/n8n_api.py activate --id <workflow-id>\npython3 scripts/n8n_api.py deactivate --id <workflow-id>\n\nTesting & Validation\nValidate Workflow Structure\n# Validate existing workflow\npython3 scripts/n8n_tester.py validate --id <workflow-id>\n\n# Validate from file\npython3 scripts/n8n_tester.py validate --file workflow.json --pretty\n\n# Generate validation report\npython3 scripts/n8n_tester.py report --id <workflow-id>\n\nDry Run Testing\n# Test with data\npython3 scripts/n8n_tester.py dry-run --id <workflow-id> --data '{\"email\": \"test@example.com\"}'\n\n# Test with data file\npython3 scripts/n8n_tester.py dry-run --id <workflow-id> --data-file test-data.json\n\n# Full test report (validation + dry run)\npython3 scripts/n8n_tester.py dry-run --id <workflow-id> --data-file test.json --report\n\nTest Suite\n# Run multiple test cases\npython3 scripts/n8n_tester.py test-suite --id <workflow-id> --test-suite test-cases.json\n\nExecution Monitoring\nList Executions\n# Recent executions (all workflows)\npython3 scripts/n8n_api.py list-executions --limit 10 --pretty\n\n# Specific workflow executions\npython3 scripts/n8n_api.py list-executions --id <workflow-id> --limit 20 --pretty\n\nGet Execution Details\npython3 scripts/n8n_api.py get-execution --id <execution-id> --pretty\n\nManual Execution\n# Trigger workflow\npython3 scripts/n8n_api.py execute --id <workflow-id>\n\n# Execute with data\npython3 scripts/n8n_api.py execute --id <workflow-id> --data '{\"key\": \"value\"}'\n\nPerformance Optimization\nAnalyze Performance\n# Full performance analysis\npython3 scripts/n8n_optimizer.py analyze --id <workflow-id> --pretty\n\n# Analyze specific period\npython3 scripts/n8n_optimizer.py analyze --id <workflow-id> --days 30 --pretty\n\nGet Optimization Suggestions\n# Priority-ranked suggestions\npython3 scripts/n8n_optimizer.py suggest --id <workflow-id> --pretty\n\nGenerate Optimization Report\n# Human-readable report with metrics, bottlenecks, and suggestions\npython3 scripts/n8n_optimizer.py report --id <workflow-id>\n\nGet Workflow Statistics\n# Execution statistics\npython3 scripts/n8n_api.py stats --id <workflow-id> --days 7 --pretty\n\nPython API\nBasic Usage\nfrom scripts.n8n_api import N8nClient\n\nclient = N8nClient()\n\n# List workflows\nworkflows = client.list_workflows(active=True)\n\n# Get workflow\nworkflow = client.get_workflow('workflow-id')\n\n# Create workflow\nnew_workflow = client.create_workflow({\n    'name': 'My Workflow',\n    'nodes': [...],\n    'connections': {...}\n})\n\n# Activate/deactivate\nclient.activate_workflow('workflow-id')\nclient.deactivate_workflow('workflow-id')\n\n# Executions\nexecutions = client.list_executions(workflow_id='workflow-id', limit=10)\nexecution = client.get_execution('execution-id')\n\n# Execute workflow\nresult = client.execute_workflow('workflow-id', data={'key': 'value'})\n\nValidation & Testing\nfrom scripts.n8n_api import N8nClient\nfrom scripts.n8n_tester import WorkflowTester\n\nclient = N8nClient()\ntester = WorkflowTester(client)\n\n# Validate workflow\nvalidation = tester.validate_workflow(workflow_id='123')\nprint(f\"Valid: {validation['valid']}\")\nprint(f\"Errors: {validation['errors']}\")\nprint(f\"Warnings: {validation['warnings']}\")\n\n# Dry run\nresult = tester.dry_run(\n    workflow_id='123',\n    test_data={'email': 'test@example.com'}\n)\nprint(f\"Status: {result['status']}\")\n\n# Test suite\ntest_cases = [\n    {'name': 'Test 1', 'input': {...}, 'expected': {...}},\n    {'name': 'Test 2', 'input': {...}, 'expected': {...}}\n]\nresults = tester.test_suite('123', test_cases)\nprint(f\"Passed: {results['passed']}/{results['total_tests']}\")\n\n# Generate report\nreport = tester.generate_test_report(validation, result)\nprint(report)\n\nPerformance Optimization\nfrom scripts.n8n_optimizer import WorkflowOptimizer\n\noptimizer = WorkflowOptimizer()\n\n# Analyze performance\nanalysis = optimizer.analyze_performance('workflow-id', days=7)\nprint(f\"Performance Score: {analysis['performance_score']}/100\")\nprint(f\"Health: {analysis['execution_metrics']['health']}\")\n\n# Get suggestions\nsuggestions = optimizer.suggest_optimizations('workflow-id')\nprint(f\"Priority Actions: {len(suggestions['priority_actions'])}\")\nprint(f\"Quick Wins: {len(suggestions['quick_wins'])}\")\n\n# Generate report\nreport = optimizer.generate_optimization_report(analysis)\nprint(report)\n\nCommon Workflows\n1. Validate and Test Workflow\n# Validate workflow structure\npython3 scripts/n8n_tester.py validate --id <workflow-id> --pretty\n\n# Test with sample data\npython3 scripts/n8n_tester.py dry-run --id <workflow-id> \\\n  --data '{\"email\": \"test@example.com\", \"name\": \"Test User\"}'\n\n# If tests pass, activate\npython3 scripts/n8n_api.py activate --id <workflow-id>\n\n2. Debug Failed Workflow\n# Check recent executions\npython3 scripts/n8n_api.py list-executions --id <workflow-id> --limit 10 --pretty\n\n# Get specific execution details\npython3 scripts/n8n_api.py get-execution --id <execution-id> --pretty\n\n# Validate workflow structure\npython3 scripts/n8n_tester.py validate --id <workflow-id>\n\n# Generate test report\npython3 scripts/n8n_tester.py report --id <workflow-id>\n\n# Check for optimization issues\npython3 scripts/n8n_optimizer.py report --id <workflow-id>\n\n3. Optimize Workflow Performance\n# Analyze current performance\npython3 scripts/n8n_optimizer.py analyze --id <workflow-id> --days 30 --pretty\n\n# Get actionable suggestions\npython3 scripts/n8n_optimizer.py suggest --id <workflow-id> --pretty\n\n# Generate comprehensive report\npython3 scripts/n8n_optimizer.py report --id <workflow-id>\n\n# Review execution statistics\npython3 scripts/n8n_api.py stats --id <workflow-id> --days 30 --pretty\n\n# Test optimizations with dry run\npython3 scripts/n8n_tester.py dry-run --id <workflow-id> --data-file test-data.json\n\n4. Monitor Workflow Health\n# Check active workflows\npython3 scripts/n8n_api.py list-workflows --active true --pretty\n\n# Review recent execution status\npython3 scripts/n8n_api.py list-executions --limit 20 --pretty\n\n# Get statistics for each critical workflow\npython3 scripts/n8n_api.py stats --id <workflow-id> --pretty\n\n# Generate health reports\npython3 scripts/n8n_optimizer.py report --id <workflow-id>\n\nValidation Checks\n\nThe testing module performs comprehensive validation:\n\nStructure Validation\n✓ Required fields present (nodes, connections)\n✓ All nodes have names and types\n✓ Connection targets exist\n✓ No disconnected nodes (warning)\nConfiguration Validation\n✓ Nodes requiring credentials are configured\n✓ Required parameters are set\n✓ HTTP nodes have URLs\n✓ Webhook nodes have paths\n✓ Email nodes have content\nFlow Validation\n✓ Workflow has trigger nodes\n✓ Proper execution flow\n✓ No circular dependencies\n✓ End nodes identified\nOptimization Analysis\n\nThe optimizer analyzes multiple dimensions:\n\nExecution Metrics\nTotal executions\nSuccess/failure rates\nHealth status (excellent/good/fair/poor)\nError patterns\nPerformance Metrics\nNode count and complexity\nConnection patterns\nExpensive operations (API calls, database queries)\nParallel execution opportunities\nBottleneck Detection\nSequential expensive operations\nHigh failure rates\nMissing error handling\nRate limit issues\nOptimization Opportunities\nParallel Execution: Identify nodes that can run concurrently\nCaching: Suggest caching for repeated API calls\nBatch Processing: Recommend batching for large datasets\nError Handling: Add error recovery mechanisms\nComplexity Reduction: Split complex workflows\nTimeout Settings: Configure execution limits\nPerformance Scoring\n\nWorkflows receive a performance score (0-100) based on:\n\nSuccess Rate: Higher is better (50% weight)\nComplexity: Lower is better (30% weight)\nBottlenecks: Fewer is better (critical: -20, high: -10, medium: -5)\nOptimizations: Implemented best practices (+5 each)\n\nScore interpretation:\n\n90-100: Excellent - Well-optimized\n70-89: Good - Minor improvements possible\n50-69: Fair - Optimization recommended\n0-49: Poor - Significant issues\nBest Practices\nDevelopment\nPlan Structure: Design workflow nodes and connections before building\nValidate First: Always validate before deployment\nTest Thoroughly: Use dry-run with multiple test cases\nError Handling: Add error nodes for reliability\nDocumentation: Comment complex logic in Code nodes\nTesting\nSample Data: Create realistic test data files\nEdge Cases: Test boundary conditions and errors\nIncremental: Test each node addition\nRegression: Retest after changes\nProduction-like: Use staging environment that mirrors production\nDeployment\nInactive First: Deploy workflows in inactive state\nGradual Rollout: Test with limited traffic initially\nMonitor Closely: Watch first executions carefully\nQuick Rollback: Be ready to deactivate if issues arise\nDocument Changes: Keep changelog of modifications\nOptimization\nBaseline Metrics: Capture performance before changes\nOne Change at a Time: Isolate optimization impacts\nMeasure Results: Compare before/after metrics\nRegular Reviews: Schedule monthly optimization reviews\nCost Awareness: Monitor API usage and execution costs\nMaintenance\nHealth Checks: Weekly execution statistics review\nError Analysis: Investigate failure patterns\nPerformance Monitoring: Track execution times\nCredential Rotation: Update credentials regularly\nCleanup: Archive or delete unused workflows\nTroubleshooting\nAuthentication Error\nError: N8N_API_KEY not found in environment\n\n\nSolution: Set environment variable:\n\nexport N8N_API_KEY=\"your-api-key\"\n\nConnection Error\nError: HTTP 401: Unauthorized\n\n\nSolution:\n\nVerify API key is correct\nCheck N8N_BASE_URL is set correctly\nConfirm API access is enabled in n8n\nValidation Errors\nValidation failed: Node missing 'name' field\n\n\nSolution: Check workflow JSON structure, ensure all required fields present\n\nExecution Timeout\nStatus: timeout - Execution did not complete\n\n\nSolution:\n\nCheck workflow for infinite loops\nReduce dataset size for testing\nOptimize expensive operations\nSet execution timeout in workflow settings\nRate Limiting\nError: HTTP 429: Too Many Requests\n\n\nSolution:\n\nAdd Wait nodes between API calls\nImplement exponential backoff\nUse batch processing\nCheck API rate limits\nMissing Credentials\nWarning: Node 'HTTP_Request' may require credentials\n\n\nSolution:\n\nConfigure credentials in n8n UI\nAssign credentials to node\nTest connection before activating\nFile Structure\n~/clawd/skills/n8n/\n├── SKILL.md                    # This file\n├── scripts/\n│   ├── n8n_api.py             # Core API client (extended)\n│   ├── n8n_tester.py          # Testing & validation\n│   └── n8n_optimizer.py       # Performance optimization\n└── references/\n    └── api.md                 # n8n API reference\n\nAPI Reference\n\nFor detailed n8n REST API documentation, see references/api.md or visit: https://docs.n8n.io/api/\n\nSupport\n\nDocumentation:\n\nn8n Official Docs: https://docs.n8n.io\nn8n Community Forum: https://community.n8n.io\nn8n API Reference: https://docs.n8n.io/api/\n\nDebugging:\n\nUse validation: python3 scripts/n8n_tester.py validate --id <workflow-id>\nCheck execution logs: python3 scripts/n8n_api.py get-execution --id <execution-id>\nReview optimization report: python3 scripts/n8n_optimizer.py report --id <workflow-id>\nTest with dry-run: python3 scripts/n8n_tester.py dry-run --id <workflow-id> --data-file test.json"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/thomasansems/n8n",
    "publisherUrl": "https://clawhub.ai/thomasansems/n8n",
    "owner": "thomasansems",
    "version": "2.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/n8n",
    "downloadUrl": "https://openagent3.xyz/downloads/n8n",
    "agentUrl": "https://openagent3.xyz/skills/n8n/agent",
    "manifestUrl": "https://openagent3.xyz/skills/n8n/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/n8n/agent.md"
  }
}