Library / Monitoring, Ops & Incidents
Monitoring, Ops & Incidents
Monitor n8n workflow errors and OpenAI spend with Slack, Gmail and Sheets
Checks n8n execution health and LLM cost every hour, pauses runaway workflows, and uses an AI agent to write root-cause reports to Slack, Gmail and Sheets.
What it does
## 🩺 n8n Instance Health & Cost Monitor v3 For teams running a busy n8n instance, where one expired credential or a looping AI agent can fail hundreds of times overnight. By morning the on-call engineer is staring at fifty red executions with no idea which one matters. ### How it works Every hour the workflow reads recent executions for every active workflow through the n8n API and scores error rate, volume and LLM spend. Runaway workflows are switched off. For each incident, an AI agent reviews the failing node's configuration, past incidents and the weekly baseline, then writes a root cause and fix steps. That goes to Slack with Re-enable, Acknowledge and Snooze buttons. Serious cases page on-call by email. Every Monday it compares the week with earlier weeks, clusters similar errors, draws an 8-week trend chart and emails an AI-written health report. ### Setup steps 1. Create an n8n API key and add it as Header Auth (X-N8N-API-KEY). 2. Create a Google Sheet with Guard_Log and Metrics_History tabs. 3. Connect Google Sheets, Slack, Gmail and OpenAI. 4. Set your instance URL in both Set Monitor Config and Set Action Lane Config, plus thresholds and emails. 5. Tag must-not-stop workflows no-auto-disable, run the guard once manually, then activate.
The steps
- Every Hour (Guard)
- Every Monday 9 AM (Digest)
- Set Guard Mode (1h Window)
- Set Digest Mode (7-Day Window)
- Set Monitor Config
- Fetch Active Workflows
- Build Workflow Index
- Fetch Executions per Workflow
- Compute Health & Cost Metrics
- Route by Mode
- Read Guard Log Sheet
- Read Metrics History Sheet
- Classify & Dedupe Incidents
- Build Failure Sample List
51 steps in total.
Similar automations
Monitoring, Ops & IncidentsMonitor n8n workflow errors and LLM spend with Slack, Gmail, OpenAI and Sheets28 stepsMonitoring, Ops & IncidentsDetect ad spend anomalies and pacing issues across Google Ads, Meta and GA423 stepsFinance, Invoices & AccountingRoute spend requests from forms, ERP and Slack to approvers by amount threshold30 stepsFinance, Invoices & AccountingExtract Gmail Invoice Spend Details with Claude and Gemini27 steps