AutomationFlowsWeb Scraping › Website & API Health Monitoring System with Http Status Validation

Website & API Health Monitoring System with Http Status Validation

ByIbrahim Emre POLAT @epolat on n8n.io

Performs HTTP health checks on websites and APIs with automatic health status validation Checks HTTP status codes and analyzes JSON responses for common health indicators Returns detailed status information including response times and health status Implements conditional logic…

Webhook trigger★★★★☆ complexity13 nodesHTTP Request
Web Scraping Trigger: Webhook Nodes: 13 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #8412 — we link there as the canonical source.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "nodes": [
    {
      "id": "621e8816-888e-47a1-8bf4-314e68b92dff",
      "name": "Trigger (Webhook)",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -656,
        544
      ],
      "parameters": {
        "path": "website-check",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "29d1a8bf-5967-4738-9eee-0cf00d5587d1",
      "name": "Set Defaults",
      "type": "n8n-nodes-base.set",
      "position": [
        -432,
        544
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "0782f86f-5c5c-408a-995e-93f5e67c8ca5",
      "name": "HTTP (Ping)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -208,
        544
      ],
      "parameters": {
        "url": "={{ $json.body.url }}",
        "options": {
          "timeout": "={{ $json.body.timeoutMs }}",
          "response": {}
        }
      },
      "typeVersion": 4
    },
    {
      "id": "1a6612e0-b71b-46b1-9a69-7dbde08244e9",
      "name": "IF Status < expect",
      "type": "n8n-nodes-base.if",
      "position": [
        32,
        544
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "number": [
            {
              "value1": "={{ $json.statusCode }}",
              "value2": "={{ $json.body.expectStatusUnder }}",
              "operation": "smaller"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "7c1e04f6-7281-4fe7-8a7f-942cda1f53f5",
      "name": "Health Check (Auto)",
      "type": "n8n-nodes-base.code",
      "position": [
        272,
        480
      ],
      "parameters": {
        "jsCode": "// Always perform basic health check on JSON response\nconst body = $json.body.body;\nlet healthStatus = 'unknown';\nlet isHealthy = false;\n\n// Check common health check patterns\nif (body && typeof body === 'object') {\n  // Check for common health indicators\n  if (body.status === 'ok' || body.status === 'UP' || body.status === 'healthy') {\n    healthStatus = body.status;\n    isHealthy = true;\n  } else if (body.health === 'ok' || body.health === 'UP' || body.health === 'healthy') {\n    healthStatus = body.health;\n    isHealthy = true;\n  } else if (body.state === 'ok' || body.state === 'UP' || body.state === 'healthy') {\n    healthStatus = body.state;\n    isHealthy = true;\n  } else if (body.ok === true) {\n    healthStatus = 'ok';\n    isHealthy = true;\n  } else {\n    // If no clear health indicator, assume healthy if we got a valid JSON response\n    healthStatus = 'response_received';\n    isHealthy = true;\n  }\n} else {\n  // No JSON body or invalid JSON\n  healthStatus = 'no_json';\n  isHealthy = false;\n}\n\nreturn {\n  healthCheck: 'performed',\n  healthStatus: healthStatus,\n  pass: isHealthy,\n  responseBody: body\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "e1811eac-a0d4-4320-a961-b8114f82620b",
      "name": "IF Health passes",
      "type": "n8n-nodes-base.if",
      "position": [
        496,
        480
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "boolean": [
            {
              "value1": "={{ $json.pass }}",
              "operation": "true"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "dd5c7ed7-c83c-47b9-80ad-c538b6c52a56",
      "name": "Ping \u2192 OK",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        432
      ],
      "parameters": {
        "jsCode": "return {\n  ok: true,\n  detail: 'Status and Health OK',\n  statusCode: $json.body.statusCode,\n  healthStatus: $json.body.healthStatus,\n  timestamp: new Date().toISOString()\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "704775dd-5de5-4e86-ba38-2ba4b3b472aa",
      "name": "Ping \u2192 FAIL (Health)",
      "type": "n8n-nodes-base.code",
      "position": [
        736,
        656
      ],
      "parameters": {
        "jsCode": "return {\n  ok: false,\n  error: 'Health check failed',\n  statusCode: $json.body.statusCode,\n  healthStatus: $json.body.healthStatus,\n  responseBody: $json.body.responseBody,\n  timestamp: new Date().toISOString()\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "4876e4a1-9b45-4c43-93b1-f4ddb8fd3039",
      "name": "Ping \u2192 FAIL (Status)",
      "type": "n8n-nodes-base.code",
      "position": [
        272,
        656
      ],
      "parameters": {
        "jsCode": "return {\n  ok: false,\n  error: 'HTTP status not acceptable',\n  statusCode: $json.body.statusCode,\n  timestamp: new Date().toISOString()\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "d38463bd-cfc6-4fb4-bd88-feb5c59d354f",
      "name": "Respond (JSON)",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        944,
        544
      ],
      "parameters": {
        "options": {
          "responseCode": 200
        },
        "respondWith": "json",
        "responseBody": "={{ $json }}"
      },
      "typeVersion": 1
    },
    {
      "id": "5fda4dc1-7b89-49d6-acb6-9dfec7ff7f70",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        336
      ],
      "parameters": {
        "width": 272,
        "height": 208,
        "content": "## START HERE\n- Send POST request to webhook with URL parameter\n- Configure timeout and status expectations\n- Example: {\"url\": \"https://your-site.com\"}"
      },
      "typeVersion": 1
    },
    {
      "id": "8a903893-2a7c-4ea4-b9ae-9f84ad812899",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        240
      ],
      "parameters": {
        "width": 256,
        "height": 224,
        "content": "## HEALTH VALIDATION\n- Analyzes JSON response for health indicators\n- Looks for status, health, or ok fields in response body\n- No valid JSON response triggers health failure"
      },
      "typeVersion": 1
    },
    {
      "id": "658a6a7f-16d6-4a62-ad9d-6c94eae0e07d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        240
      ],
      "parameters": {
        "width": 256,
        "height": 192,
        "content": "## RESPONSE PATHS\n- OK: Status and health checks pass\n- FAIL (Health): Health check fails despite good status  \n- FAIL (Status): HTTP status code above expected threshold"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "HTTP (Ping)": {
      "main": [
        [
          {
            "node": "IF Status < expect",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ping \u2192 OK": {
      "main": [
        [
          {
            "node": "Respond (JSON)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Defaults": {
      "main": [
        [
          {
            "node": "HTTP (Ping)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Health passes": {
      "main": [
        [
          {
            "node": "Ping \u2192 OK",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Ping \u2192 FAIL (Health)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger (Webhook)": {
      "main": [
        [
          {
            "node": "Set Defaults",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Status < expect": {
      "main": [
        [
          {
            "node": "Health Check (Auto)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Ping \u2192 FAIL (Status)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Health Check (Auto)": {
      "main": [
        [
          {
            "node": "IF Health passes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ping \u2192 FAIL (Health)": {
      "main": [
        [
          {
            "node": "Respond (JSON)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ping \u2192 FAIL (Status)": {
      "main": [
        [
          {
            "node": "Respond (JSON)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Performs HTTP health checks on websites and APIs with automatic health status validation Checks HTTP status codes and analyzes JSON responses for common health indicators Returns detailed status information including response times and health status Implements conditional logic…

Source: https://n8n.io/workflows/8412/ — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

*Tags: AI Agent, MCP Server, n8n API, Monitoring, Debugging, Workflow Analytics, Automation*

HTTP Request
Web Scraping

This n8n workflow automates the process of monitoring inventory levels for Shopify products, ensuring timely updates and efficient stock management. It is designed to alert users when inventory levels

HTTP Request, GraphQL
Web Scraping

A real-time monitoring dashboard for your n8n production workflows, accessible directly from the browser via webhook.

HTTP Request
Web Scraping

Proactively alert to service endpoint changes and pod/container issues (Pending, Not Ready, Restart spikes) using Prometheus metrics, formatted and sent to Slack.

HTTP Request
Web Scraping

Tired of being let down by the Google Drive Trigger? Rather not exhaust system resources by polling every minute? Then this workflow is for you!

HTTP Request, Execute Workflow Trigger