Zum Inhalt springen
NEUMarktplatz und dein Team: Verkaufe, was du baust, und bekomm Pläne und Änderungen, die getestet sind, bevor du sie siehst. Neuigkeiten ansehen

Bibliothek / Monitoring, Betrieb & Störungen

Monitoring, Betrieb & Störungen

n8n-Workflow-Fehler und LLM-Ausgaben mit Slack, Gmail, OpenAI und Sheets überwachen

Läuft stündlich, liest den n8n-Ausführungsverlauf, berechnet Fehlerraten und geschätzte LLM-Ausgaben, deaktiviert außer Kontrolle geratene Workflows und meldet Vorfälle mit dem fehlerhaften Knoten an Slack.

Was sie bewirkt

## 🩺 n8n Instance Health & Cost Monitor For anyone running a self-hosted or cloud n8n instance with dozens of active workflows, where a broken credential or a looping AI agent can fail hundreds of times or burn through an OpenAI budget overnight before anyone looks. ### How it works Every hour, the workflow reads recent executions for every active workflow through the n8n API, then works out error rates, run volume and estimated LLM spend. Runaway workflows are switched off automatically (tag one no-auto-disable to protect it), and every incident is posted to Slack with the failing node and error message. Repeat warnings are held back by a cooldown. Every Monday it looks at the whole week instead. It compares it with the week before, groups similar errors into clusters, and has GPT-4o-mini write a short health report. That report is emailed with a Slack TL;DR, and the week's numbers are saved so the trend builds up over time. ### Setup steps 1. Create an n8n API key (Settings → n8n API) and add it as Header Auth with the X-N8N-API-KEY header. 2. Create a Google Sheet with Guard_Log and Metrics_History tabs. 3. Connect Google Sheets, Slack, Gmail and OpenAI. 4. In Set Monitor Config, set your instance URL, thresholds, token budget and digest email. 5. Run the hourly guard once manually, then activate.

Die Schritte

  1. Every Hour (Guard)
  2. Every Monday 9 AM (Digest)
  3. Set Guard Mode (1h Window)
  4. Set Digest Mode (7-Day Window)
  5. Set Monitor Config
  6. Fetch Active Workflows
  7. Build Workflow Index
  8. Fetch Executions per Workflow
  9. Compute Health & Cost Metrics
  10. Route by Mode
  11. Read Guard Log Sheet
  12. Read Metrics History Sheet
  13. Classify & Dedupe Incidents
  14. Build Failure Sample List

Insgesamt 28 Schritte.

Ähnliche Automatisierungen