This workflow corresponds to n8n.io template #9852 — we link there as the canonical source.
This workflow follows the Agent → Emailsend 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 →
{
"id": "ZrSNA55iSMYyBkl5",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Automated Health Check for Servers via HTTP and Email Alerts",
"tags": [],
"nodes": [
{
"id": "8bb22fc0-2ae6-43cf-9ac1-d44efdb77596",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-512,
-240
],
"parameters": {
"text": "=You are an AI system report generator. You will receive raw SSH output from a Linux server. Your task is to generate a structured system report with actionable recommendations, prioritization, and an executive summary.\n\nOutput JSON must strictly follow this schema:\n\n{\n \"executiveSummary\": string,\n \"summary\": string,\n \"details\": string,\n \"status\": string, // OK, WARNING, CRITICAL\n \"recommendations\": [\n {\n \"issue\": string,\n \"priority\": string, // HIGH, MEDIUM, LOW\n \"action\": string\n }\n ]\n}\n\nRequirements:\n1. Executive Summary: 2\u20133 lines for management, highlighting critical issues and overall system health.\n2. Summary: concise technical overview of CPU, memory, disk, network, and critical processes.\n3. Details: generate a professional, modern HTML report. Include tables, inline styles, colored highlights, simple inline graphs, and actionable recommendations.\n4. Recommendations: list each issue detected, assign a priority (HIGH/MEDIUM/LOW), and suggest a specific action.\n5. Status: determine overall system health based on thresholds (CPU >80%, memory <10% free, disk >90%, network saturation >80%, top processes consuming high CPU).\n6. Return only JSON matching the schema. Do not add extra fields.\n\nHere is the raw SSH output:\n\n {{ $json.stdout }}",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "a4ec3064-2773-491d-8b8b-4e93b94288e0",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-436,
-16
],
"parameters": {
"autoFix": true,
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"executiveSummary\": {\n \"type\": \"string\",\n \"description\": \"2\u20133 line summary suitable for management highlighting critical issues and overall system health.\"\n },\n \"summary\": {\n \"type\": \"string\",\n \"description\": \"Concise technical overview highlighting key metrics like CPU, memory, disk, network, and critical processes.\"\n },\n \"details\": {\n \"type\": \"string\",\n \"description\": \"HTML report ready for email, with inline styling, tables, colored highlights, simple graphs, and actionable recommendations.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"OK\", \"WARNING\", \"CRITICAL\"],\n \"description\": \"Overall system health based on analyzed metrics.\"\n },\n \"recommendations\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"issue\": { \"type\": \"string\" },\n \"priority\": { \"type\": \"string\", \"enum\": [\"HIGH\", \"MEDIUM\", \"LOW\"] },\n \"action\": { \"type\": \"string\" }\n },\n \"required\": [\"issue\", \"priority\", \"action\"]\n }\n }\n },\n \"required\": [\"executiveSummary\", \"summary\", \"details\", \"status\", \"recommendations\"]\n}\n"
},
"typeVersion": 1.3
},
{
"id": "6acaee4a-890b-4c69-9635-ef1fef7057ad",
"name": "Execute a command",
"type": "n8n-nodes-base.ssh",
"position": [
-736,
-240
],
"parameters": {
"command": "echo \"---SYSTEM INFO---\"; hostname; uptime;\necho \"---CPU---\"; top -bn1 | grep \"Cpu(s)\";\necho \"---MEMORY---\"; free -m;\necho \"---DISK---\"; df -h;\necho \"---SERVICES---\"; systemctl list-units --type=service --state=running;\necho \"---NETWORK---\"; ip -s link;\necho \"---TOP PROCESSES---\"; ps -eo pid,comm,%cpu,%mem --sort=-%cpu | head -n 10\n",
"authentication": "privateKey"
},
"typeVersion": 1
},
{
"id": "67574230-5dfa-47ac-9862-d7736173e10d",
"name": "Azure OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
"position": [
-560,
96
],
"parameters": {
"model": "gpt-4.1",
"options": {},
"authentication": "azureEntraCognitiveServicesOAuth2Api"
},
"typeVersion": 1
},
{
"id": "7d8866bd-5698-4285-8f43-adadcf8956dc",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-960,
-240
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.2
},
{
"id": "c7151766-7c55-4e13-a9ee-e4745c541753",
"name": "Send email",
"type": "n8n-nodes-base.emailSend",
"position": [
-68,
-240
],
"parameters": {
"html": "={{ $json.output.details }}",
"options": {},
"subject": "=Health Report - Server | {{ $json.output.status }}"
},
"credentials": {
"smtp": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "252e2019-fb19-4fa3-96ad-df6b8541942a",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1760,
-1376
],
"parameters": {
"width": 928,
"height": 928,
"content": "## Automated Server Health Check with AI & Email Alerts\n\n## **Purpose:**\nThis workflow automatically gathers **system health data** from a server, analyzes it using an AI Agent, and sends **email alerts** if anything unusual is detected. It\u2019s ideal for DevOps teams or sysadmins who want an automated health check without installing heavy monitoring software.\n\n## **How it works:**\n\n1. **Schedule Trigger** \u2013 Runs the workflow at set intervals (e.g., every 5 minutes).\n2. **Execute Command** \u2013 Runs shell commands to collect system info, CPU, memory, disk usage, running services, network stats, and top processes:\n\n * `echo \"---SYSTEM INFO---\"; hostname; uptime;` \u2192 Server identity and uptime\n * `echo \"---CPU---\"; top -bn1 | grep \"Cpu(s)\";` \u2192 CPU usage\n * `echo \"---MEMORY---\"; free -m;` \u2192 Memory usage in MB\n * `echo \"---DISK---\"; df -h;` \u2192 Disk usage\n * `echo \"---SERVICES---\"; systemctl list-units --type=service --state=running;` \u2192 Running services\n * `echo \"---NETWORK---\"; ip -s link;` \u2192 Network interface stats\n * `echo \"---TOP PROCESSES---\"; ps -eo pid,comm,%cpu,%mem --sort=-%cpu | head -n 10` \u2192 Top 10 CPU-consuming processes\n3. **AI Agent** \u2013 Analyzes command outputs to detect anomalies or potential issues.\n4. **Structured Output Parser** \u2013 Formats AI output so it can be used for email alerts.\n5. **Send Email** \u2013 Notifies recipients with server health summary or detected issues.\n\n## **Setup Instructions:**\n\n* Replace the commands in the **Execute Command node** if you want custom server checks.\n* Configure the **Azure OpenAI Chat** node with your API credentials in n8n credentials.\n* Update the **Email node** with your SMTP credentials and recipient addresses.\n* Adjust the **Schedule Trigger** interval according to your monitoring needs.\n\n## **Notes:**\n\n* All credentials should be stored securely; do **not hardcode API keys**.\n* Multiple servers can be monitored by adding more command nodes or duplicating the workflow.\n* Suitable for Self-Hosted Instances also."
},
"typeVersion": 1
},
{
"id": "1372afc9-a9aa-4ff1-8936-a4078e9acccf",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1040,
-80
],
"parameters": {
"color": 5,
"width": 224,
"height": 128,
"content": "**Schedule Trigger:**\n *\u201cTriggers the workflow at your chosen interval to run server health checks automatically.\u201d*"
},
"typeVersion": 1
},
{
"id": "bf182b47-8461-45b0-a0e8-d15bfbec602f",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-784,
-416
],
"parameters": {
"color": 5,
"width": 192,
"content": "**Execute Command:**\n *\u201cCollects detailed server metrics: hostname, uptime, CPU, memory, disk, services, network stats, and top processes.\u201d*"
},
"typeVersion": 1
},
{
"id": "2fd3f1b4-4bf6-451f-b6bf-1909f77d2a76",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-496,
-416
],
"parameters": {
"color": 5,
"content": "**AI Agent:**\n *\u201cAnalyzes the collected server data for anomalies and prepares structured results.\u201d*\n"
},
"typeVersion": 1
},
{
"id": "c3e55927-518a-4915-b0b5-b620b3ce9cbd",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-176,
-32
],
"parameters": {
"color": 5,
"content": "**Structured Output Parser:**\n *\u201cEnsures AI output is formatted correctly for the email alert.\u201d*"
},
"typeVersion": 1
},
{
"id": "297baae0-7057-46e1-a919-3f71ce0ffef2",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-96,
-416
],
"parameters": {
"color": 5,
"content": "\n\n**Send Email:**\n *\u201cSends an alert email summarizing the server health or any detected issues.\u201d*"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "3b37f074-af91-4655-ab83-68f8baab578d",
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Send email",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Execute a command",
"type": "main",
"index": 0
}
]
]
},
"Execute a command": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Azure OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Structured Output Parser",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
}
}
}
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.
smtp
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow is ideal for sysadmins, DevOps engineers, and IT teams who want to monitor server health automatically and receive instant email notifications if any server goes down. It’s perfect for anyone managing multiple servers or services without setting up a full-fledged…
Source: https://n8n.io/workflows/9852/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Automatically generate and distribute detailed End-of-Day (EOD) reports combining task progress from ClickUp and opportunity data from GoHighLevel. This workflow uses AI to analyze daily performance,
This workflow automates satellite data processing by ingesting raw geospatial data, applying AI analysis, and submitting formatted reports to regulatory authorities. Designed for environmental agencie
This workflow automates enterprise claims cost leakage detection by identifying overpayments, policy deviations, and pricing inconsistencies across claims data. It supports claims operations, finance,
This workflow transforms raw support tickets into actionable developer insights using AI and data processing. It automatically detects recurring issues, identifies root causes, ranks severity, and gen
This workflow automates patient risk assessment and clinical alerting for healthcare providers using NVIDIA AI models. Designed for hospitals, clinics, and healthcare organizations, it addresses the c