Send deduplicated Kubernetes(EKS/GKE/AKS) error logs from Grafana Loki to Slack
Ready for 3.0What this workflow does
This workflow has 5 nodes and runs on a schedule (every minute). It uses only n8n's built-in nodes. It also calls loki-gateway.monitoring.svc.cluster.local:8080 and slack.com over HTTP.
How it runs
Trigger: On a schedule (every minute).
- 📥 Query Loki for Error Logs (HTTP Request): calls loki-gateway.monitoring.svc.cluster.local:8080
- 🧹 Extract Log Fields (Code): runs custom JavaScript code
- 🧠 Remove Duplicate Alerts (Code): runs custom JavaScript code
- 📤 Send Alerts to Slack (HTTP Request): calls slack.com (POST)
HTTP calls to: loki-gateway.monitoring.svc.cluster.local:8080, slack.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (3)
- HTTP Request
n8n-nodes-base.httpRequest - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Code
n8n-nodes-base.code
From the author
✨ Summary Efficiently monitor Kubernetes environments by sending only unique error logs from Grafana Loki to Slack. Reduces alert fatigue while keeping your team informed about critical log events. 🧑💻 Who’s it for - DevOps or SRE engineers running…