AutomationFlowsWeb Scraping › API Health Monitor

API Health Monitor

API Health Monitor. Uses httpRequest. Scheduled trigger; 10 nodes.

Cron / scheduled trigger★★★★☆ complexity10 nodesHTTP Request
Web Scraping Trigger: Cron / scheduled Nodes: 10 Complexity: ★★★★☆ Added:

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
{
  "name": "API Health Monitor",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 5
            }
          ]
        }
      },
      "id": "06-schedule-trigger",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -720,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "const endpoints = [{ name: 'Orders API', url: 'https://api.example.com/endpoint', expected: [200, 201, 202, 204] }, { name: 'Billing API', url: 'https://api.example.com/endpoint', expected: [200] }];\nreturn endpoints.map((endpoint) => ({ json: { ...endpoint, started_at: Date.now() } }));"
      },
      "id": "06-set-endpoint-list",
      "name": "Set Endpoint List",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -480,
        0
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "={{$json.url}}",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "httpHeaderAuth",
        "options": {
          "timeout": 10000,
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        }
      },
      "id": "06-http-request",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -240,
        0
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "continueOnFail": true
    },
    {
      "parameters": {
        "jsCode": "const endpoint = $('Set Endpoint List').first().json;\nconst statusCode = Number($json.statusCode || $json.status || 0);\nconst healthy = endpoint.expected.includes(statusCode);\nreturn [{ json: { name: endpoint.name, url: endpoint.url, status_code: statusCode, status: healthy ? 'healthy' : 'unhealthy', expected: endpoint.expected, checked_at: new Date().toISOString(), raw: $json } }];"
      },
      "id": "06-status-code-check",
      "name": "Status Code Check",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return [{ json: { ...$json, latency_ms: $json.raw?.headers?.['x-response-time-ms'] || null } }];"
      },
      "id": "06-latency-capture",
      "name": "Latency Capture",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        240,
        0
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.status}}",
              "operation": "equals",
              "value2": "healthy"
            }
          ]
        }
      },
      "id": "06-success-branch",
      "name": "Success Branch",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        480,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return [{ json: { ...$json, log_level: 'info' } }];"
      },
      "id": "06-log-success",
      "name": "Log Success",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        720,
        -120
      ]
    },
    {
      "parameters": {
        "jsCode": "return [{ json: { ...$json, log_level: 'warn', alert_candidate: true } }];"
      },
      "id": "06-failure-branch",
      "name": "Failure Branch",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        720,
        120
      ]
    },
    {
      "parameters": {
        "jsCode": "return [{ json: { ...$json, logged_at: new Date().toISOString() } }];"
      },
      "id": "06-log-result",
      "name": "Log Result",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        960,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return [{ json: { ...$json, notification_note: 'Replace this node with an alert channel for unhealthy endpoints.' } }];"
      },
      "id": "06-optional-notification-placeholder",
      "name": "Optional Notification Placeholder",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1200,
        0
      ]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Set Endpoint List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Endpoint List": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Status Code Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Status Code Check": {
      "main": [
        [
          {
            "node": "Latency Capture",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Latency Capture": {
      "main": [
        [
          {
            "node": "Success Branch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Success Branch": {
      "main": [
        [
          {
            "node": "Log Success",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Failure Branch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Success": {
      "main": [
        [
          {
            "node": "Log Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Failure Branch": {
      "main": [
        [
          {
            "node": "Log Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Result": {
      "main": [
        [
          {
            "node": "Optional Notification Placeholder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "timezone": "UTC"
  },
  "versionId": "placeholder-06"
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

API Health Monitor. Uses httpRequest. Scheduled trigger; 10 nodes.

Source: https://github.com/gharisj3/n8n-workflow-library/blob/main/workflows/06-api-health-monitor/workflow.json — 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

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
Web Scraping

Triggers at a regular interval or via a webhook request. Solves AWS WAF challenge then makes a request to fetch the product page. Extracts product data from the retrieved HTML page. Compares the curre

N8N Nodes Capsolver, HTTP Request
Web Scraping

Automatically monitor billable Kimai projects every weekday morning and receive a formatted HTML email when a project deadline is approaching or its hour budget is running low. If nothing requires att

Email Send, HTTP Request
Web Scraping

Transform your business with intelligent deal monitoring and automated customer engagement! This AI-powered coupon aggregator continuously tracks competitor deals and creates personalized marketing ca

HTTP Request