AutomationFlowsSlack & Telegram › Automated System Health Check with Slack Alerts

Automated System Health Check with Slack Alerts

Original n8n title: Wf-7: Health Check

WF-7: Health Check. Uses httpRequest, slack, postgres. Scheduled trigger; 7 nodes.

Cron / scheduled trigger★★★★☆ complexity7 nodesHTTP RequestSlackPostgres
Slack & Telegram Trigger: Cron / scheduled Nodes: 7 Complexity: ★★★★☆ Added:

This workflow follows the HTTP Request → Postgres recipe pattern — see all workflows that pair these two integrations.

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": "WF-7: Health Check",
  "nodes": [
    {
      "id": "trigger",
      "name": "Hourly Health Check",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        250,
        300
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 1
            }
          ]
        }
      }
    },
    {
      "id": "check_api",
      "name": "Check Data API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        450,
        200
      ],
      "parameters": {
        "method": "GET",
        "url": "http://data-api:8000/health",
        "options": {
          "timeout": 10000
        }
      }
    },
    {
      "id": "check_neo4j",
      "name": "Check Neo4j",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        450,
        400
      ],
      "parameters": {
        "method": "POST",
        "url": "http://data-api:8000/mcp/call/get_graph_stats",
        "body": {},
        "options": {
          "timeout": 10000
        }
      }
    },
    {
      "id": "aggregate_status",
      "name": "Aggregate Status",
      "type": "n8n-nodes-base.function",
      "position": [
        650,
        300
      ],
      "parameters": {
        "functionCode": "const apiStatus = $input.all()[0].json;\nconst neo4jStatus = $input.all()[1].json;\n\nconst allHealthy = apiStatus.status === 'healthy' && neo4jStatus;\n\nreturn [{\n  json: {\n    timestamp: new Date().toISOString(),\n    overall: allHealthy ? 'healthy' : 'degraded',\n    services: {\n      data_api: apiStatus.status || 'unknown',\n      neo4j: neo4jStatus ? 'healthy' : 'unhealthy',\n      tools_available: apiStatus.tools_available || 0\n    }\n  }\n}];"
      }
    },
    {
      "id": "check_status",
      "name": "Check Overall Status",
      "type": "n8n-nodes-base.if",
      "position": [
        850,
        300
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.overall }}",
              "value2": "healthy",
              "operation": "notEqual"
            }
          ]
        }
      }
    },
    {
      "id": "send_alert",
      "name": "Send Health Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1050,
        400
      ],
      "parameters": {
        "channel": "#system-alerts",
        "text": "\u26a0\ufe0f System Health Alert: Status is {{ $json.overall }}\nData API: {{ $json.services.data_api }}\nNeo4j: {{ $json.services.neo4j }}\nTime: {{ $json.timestamp }}"
      }
    },
    {
      "id": "log_health",
      "name": "Log Health Check",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1050,
        200
      ],
      "parameters": {
        "operation": "executeQuery",
        "query": "INSERT INTO health_checks (status, details, check_time) VALUES ($1, $2, NOW())",
        "parameters": "={{ [$json.overall, JSON.stringify($json.services)] }}"
      }
    }
  ],
  "connections": {
    "Hourly Health Check": {
      "main": [
        [
          {
            "node": "Check Data API",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Check Neo4j",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Data API": {
      "main": [
        [
          {
            "node": "Aggregate Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Neo4j": {
      "main": [
        [
          {
            "node": "Aggregate Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Status": {
      "main": [
        [
          {
            "node": "Check Overall Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Overall Status": {
      "main": [
        [
          {
            "node": "Send Health Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Health Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Health Alert": {
      "main": [
        [
          {
            "node": "Log Health Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [
    "health",
    "monitoring",
    "system"
  ]
}
Pro

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

About this workflow

WF-7: Health Check. Uses httpRequest, slack, postgres. Scheduled trigger; 7 nodes.

Source: https://github.com/123qsa/supply-chain-kg/blob/main/n8n-workflows/wf-7-health-check.json — original creator credit. Request a take-down →

More Slack & Telegram workflows → · Browse all categories →

Related workflows

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

Slack & Telegram

The template allows to make Dropcontact batch requests up to 250 requests every 10 minutes (1500/hour). Valuable if high volume email enrichment is expected.

Postgres, HTTP Request, Slack
Slack & Telegram

System Health Check. Uses httpRequest, postgres, slack. Scheduled trigger; 10 nodes.

HTTP Request, Postgres, Slack
Slack & Telegram

Crypto Price Tracker. Uses httpRequest, postgres, slack. Scheduled trigger; 9 nodes.

HTTP Request, Postgres, Slack
Slack & Telegram

Heavy IO — HTTP + DB + Slack (well-handled). Uses httpRequest, postgres, slack. Scheduled trigger; 5 nodes.

HTTP Request, Postgres, Slack
Slack & Telegram

debug. Uses httpRequest, slack, redis, mailgun. Scheduled trigger; 60 nodes.

HTTP Request, Slack, Redis +2