Monitor & auto-heal AWS EC2 instances with multi-channel alerts
Ready for 3.0What this workflow does
This workflow has 11 nodes and runs on a schedule (cron 0 */5 * * *). Along the way it connects Google Sheets. It also calls devops.oneclicksales.xyz over HTTP.
How it runs
Trigger: On a schedule (cron 0 */5 * * *).
- Get EC2 Instances (HTTP Request): calls devops.oneclicksales.xyz
- Loop Over Instances (Loop Over Items (Split in Batches)): loops over the items in batches
- Check Instance Status (HTTP Request): calls devops.oneclicksales.xyz
- Check Health Status (If): checks a condition and branches into true / false
- Analyze Health Data (Code): runs custom JavaScript code
- Restart Instance (HTTP Request): calls devops.oneclicksales.xyz
- Send WhatsApp Alert (HTTP Request): calls an HTTP API (POST)
- Send Email: sends an email over SMTP
- Log to AlertsLog Sheet (Google Sheets): append or update
Services it uses
HTTP calls to: devops.oneclicksales.xyz
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 (8)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Send Email
n8n-nodes-base.emailSend - Google Sheets
n8n-nodes-base.googleSheets - No Operation, do nothing
n8n-nodes-base.noOp
From the author
This n8n workflow automates the monitoring, health assessment, and self-healing of AWS EC2 instances in production environments. It runs periodic checks, identifies unhealthy instances based on status and metrics, restarts them automatically, and notifies…