Перейти к содержанию
НОВОЕМаркетплейс и ваша команда: продавайте то, что создали, и получайте планы и изменения, проверенные до того, как вы их увидите. Что нового

Библиотека / Мониторинг, эксплуатация и инциденты

Мониторинг, эксплуатация и инциденты

Мониторинг ошибок воркфлоу n8n и расходов на LLM с помощью Slack, Gmail, OpenAI и Sheets

Запускается каждый час: читает историю выполнения n8n, считает процент ошибок и примерные расходы на LLM, отключает неконтролируемые воркфлоу и публикует инциденты с упавшим узлом в Slack.

Что делает

## 🩺 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.

Шаги

  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

Всего шагов: 28.

Похожие автоматизации