Triage workflow incidents and monitor n8n health with Slack, Gmail, OpenAI and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 28 nodes and runs on a schedule (every hour) (plus 1 other trigger). Along the way it connects Google Sheets, OpenAI, Slack and Gmail.
How it runs
Trigger: On a schedule (every hour) (plus 1 other trigger).
- Set Guard Mode (1h Window) (Edit Fields (Set)): sets 2 fields: mode, window_hours
- Set Digest Mode (7-Day Window) (Edit Fields (Set)): sets 2 fields: mode, window_hours
- Set Monitor Config (Edit Fields (Set)): sets 12 fields: n8n_base_url, max_exec_per_hour, min_failures_for_runaway…
- Fetch Active Workflows (HTTP Request): calls an HTTP API
- Build Workflow Index (Code): runs custom JavaScript code
- Fetch Executions per Workflow (HTTP Request): calls an HTTP API
- Compute Health & Cost Metrics (Code): runs custom JavaScript code
- Route by Mode (Switch): routes items into 2 branches
- Read Guard Log Sheet (Google Sheets): uses Google Sheets
- Read Metrics History Sheet (Google Sheets): uses Google Sheets
…plus 16 more steps. See the full node list below.
Services it uses
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 (10)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if - OpenAI
@n8n/n8n-nodes-langchain.openAi - Slack
n8n-nodes-base.slack - Gmail
n8n-nodes-base.gmail
From the author
Quick overview This workflow monitors your n8n instance hourly and weekly by querying the n8n API for active workflows and recent executions, estimating error rates, performance, and OpenAI token spend, then auto-disabling runaway workflows and sending…