AutomationFlowsSlack & Telegram › Automated Hourly N8n Error Monitoring with Slack Notifications

Automated Hourly N8n Error Monitoring with Slack Notifications

ByMatheus Pedrosa @julinho on n8n.io

This template is ideal for n8n instance administrators, developers, and DevOps teams who need a proactive and organized way to monitor the health of their automations. If you want to be notified about failures as soon as they happen, without having to manually check execution…

Cron / scheduled trigger★★★★☆ complexity10 nodesn8nSlack
Slack & Telegram Trigger: Cron / scheduled Nodes: 10 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #7076 — 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
{
  "id": "7gbO6txgnBCmDw7c",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Send n8n failed execution alerts to a Slack channel",
  "tags": [],
  "nodes": [
    {
      "id": "45a1993e-1a89-4077-b258-75c8d4e74bbb",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        900,
        460
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "3491cecc-6ffc-4798-a5f4-a6230408010b",
      "name": "GetWorkflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1360,
        460
      ],
      "parameters": {
        "filters": {
          "activeWorkflows": true
        },
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4f10d86d-1410-45c6-892a-e113fd4cb2b3",
      "name": "Loop",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1580,
        460
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "b06a9bcb-4fc6-488c-bb3e-7cf1f81547ca",
      "name": "n8n",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1780,
        520
      ],
      "parameters": {
        "limit": 1,
        "filters": {
          "status": "error",
          "workflowId": {
            "__rl": true,
            "mode": "id",
            "value": "={{ $json.id }}"
          }
        },
        "options": {
          "activeWorkflows": false
        },
        "resource": "execution",
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "9012633d-3dcd-4bf5-9645-b90e51129a35",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2000,
        520
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "fd91c759-7ee6-45d8-96dd-91eabeb38796",
      "name": "MakeMessage",
      "type": "n8n-nodes-base.code",
      "position": [
        1780,
        360
      ],
      "parameters": {
        "jsCode": "const list = $input.all().map(item => item.json);\nconsole.log(list)\nlet blocks = [];\n\nfor (const item of list) {\n  if(item.qtdErrors > 0){\n    console.log(item)\n    blocks.push({\n\t\t\t\"type\": \"section\",\n\t\t\t\"text\": {\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": `:aviso: *${item.workflowName}*\\n *${item.qtdErrors}* errors found in the last run`\n\t\t\t},\n\t\t\t\"accessory\": {\n\t\t\t\t\"type\": \"button\",\n\t\t\t\t\"text\": {\n\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\"text\": \"Vizualize\",\n\t\t\t\t\t\"emoji\": true\n\t\t\t\t},\n\t\t\t\t\"value\": \"click_me_123\",\n\t\t\t\t\"url\": `${item.url}`,\n\t\t\t\t\"action_id\": \"button-action\"\n\t\t\t}\n\t\t})\n  }\n}\n\nif(blocks.length > 0){\n  return {\n    blocks: blocks\n  };\n}else{\n  return null\n}\n"
      },
      "typeVersion": 2
    },
    {
      "id": "51db21fc-6bf1-4652-944f-a00f15f492b5",
      "name": "FilterLastHour",
      "type": "n8n-nodes-base.code",
      "position": [
        2220,
        520
      ],
      "parameters": {
        "jsCode": "const list = $(\"Aggregate\").last().json.data;\n\nconst lastHour = new Date();\nlastHour.setHours(lastHour.getHours() - 1);\n\n\nconst executionsLastHour = list.filter(execution => {\n  const dataStoppedAt = new Date(execution.stoppedAt);\n\n  return dataStoppedAt > lastHour;\n});\n\nif (executionsLastHour.length > 0) {\n  console.log(`Foram encontrados ${executionsLastHour.length} itens da \u00faltima hora.`);\n} else {\n  console.log(\"Nenhum item da \u00faltima hora foi encontrado.\");\n}\n\nreturn {\n  workflowId: $(\"Loop\").last().json.id,\n  workflowName: $(\"Loop\").last().json.name,\n  qtdErrors: executionsLastHour.length,\n  url: $(\"Config\").last().json.urlBase + $(\"Loop\").last().json.id\n}"
      },
      "typeVersion": 2
    },
    {
      "id": "93684cff-609d-4b10-b375-d01724f03a42",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        900,
        240
      ],
      "parameters": {
        "width": 360,
        "height": 200,
        "content": "## Slack - Errors last 60 minutes\n\nThis workflow's objective is to monitor for errors and notify via Slack which workflows had failed executions in the last hour, providing a simple table with the ID, name, and error count.\n\nLinkedin: https://www.linkedin.com/in/matheus-pedrosa-custodio/"
      },
      "typeVersion": 1
    },
    {
      "id": "c11de8c2-1478-49ff-93a8-9cfeacb58507",
      "name": "Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        2000,
        360
      ],
      "parameters": {
        "text": "=",
        "user": {
          "__rl": true,
          "mode": "list",
          "value": "U05FMSA2610",
          "cachedResultName": "matheus.custodio"
        },
        "select": "user",
        "blocksUi": "={{ $json }}",
        "messageType": "block",
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "28c56721-55d9-448a-8311-57413b0deb84",
      "name": "Config",
      "type": "n8n-nodes-base.set",
      "position": [
        1140,
        460
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "{\n  \"urlBase\": \"https://n8n.com/workflow/\"\n}\n"
      },
      "typeVersion": 3.4
    }
  ],
  "active": false,
  "settings": {
    "timezone": "America/Sao_Paulo",
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1",
    "executionTimeout": -1,
    "saveManualExecutions": true
  },
  "versionId": "b71a7834-6b2b-46df-8c1e-911d15b7a3c3",
  "connections": {
    "n8n": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop": {
      "main": [
        [
          {
            "node": "MakeMessage",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "n8n",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config": {
      "main": [
        [
          {
            "node": "GetWorkflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "FilterLastHour",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MakeMessage": {
      "main": [
        [
          {
            "node": "Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetWorkflows": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FilterLastHour": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Config",
            "type": "main",
            "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.

Pro

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

About this workflow

This template is ideal for n8n instance administrators, developers, and DevOps teams who need a proactive and organized way to monitor the health of their automations. If you want to be notified about failures as soon as they happen, without having to manually check execution…

Source: https://n8n.io/workflows/7076/ — 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

This workflow is designed for engineering teams, project managers, and IT operations who need consistent visibility into team availability across multiple projects. It’s perfect for organizations that

HTTP Request, Execute Workflow Trigger, Slack
Slack & Telegram

This workflow is an automated system that tracks End-of-Life (EOL) dates for software and technologies used across your projects. It eliminates the need to manually monitor EOL dates in spreadsheets o

HTTP Request, Noco Db, Slack
Slack & Telegram

This workflow continuously monitors the Meta Ads Library for new creatives from a specific competitor pages, logs them into Google Sheets, and sends a concise Telegram notification with the number of

HTTP Request, Telegram, Google Sheets +1
Slack & Telegram

Enhance financial oversight with this automated n8n workflow. Triggered every 5 minutes, it fetches real-time bank transactions via an API, enriches and transforms the data, and applies smart logic to

HTTP Request, Email Send, Google Sheets +1
Slack & Telegram

This workflow automates competitive price intelligence using Bright Data's enterprise web scraping API. On a scheduled basis (default: daily at 9 AM), the system loops through configured competitor pr

HTTP Request, Google Sheets, Slack +1