Templates / Monitor n8n workflow health and OpenAI cost with Slack, Gmail and Sheets

Monitor n8n workflow health and OpenAI cost with Slack, Gmail and Sheets

Needs changes

by Rahul Joshi ✓ · 42 views · created 2026-10-12 · DevOps, AI Chatbot

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 51 nodes and runs on a schedule (every hour) (plus 2 other triggers). Along the way it connects Google Sheets, OpenAI Chat Model, OpenAI and Gmail and 1 more.

How it runs

Trigger: On a schedule (every hour) (plus 2 other triggers).

  1. Set Guard Mode (1h Window) (Edit Fields (Set)): sets 2 fields: mode, window_hours
  2. Set Digest Mode (7-Day Window) (Edit Fields (Set)): sets 2 fields: mode, window_hours
  3. Look Up Incident in Guard Log (Google Sheets): uses Google Sheets
  4. Set Monitor Config (Edit Fields (Set)): sets 15 fields: n8n_base_url, max_exec_per_hour, min_failures_for_runaway…
  5. Set Action Lane Config (Code): runs custom JavaScript code
  6. Fetch Active Workflows (HTTP Request): calls an HTTP API
  7. Validate Action Token (Code): runs custom JavaScript code
  8. Build Workflow Index (Code): runs custom JavaScript code
  9. Token Valid? (If): checks a condition and branches into true / false
  10. Fetch Executions per Workflow (HTTP Request): calls an HTTP API

…plus 34 more steps. See the full node list below.

Services it uses

Google SheetsOpenAI Chat ModelOpenAIGmailSlack

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in AI Incident Triage Agent (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
AI Incident Triage Agent (v1.7)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (16)

From the author

Quick overview This workflow monitors an n8n instance hourly and weekly by calling the n8n API to calculate execution health metrics and estimated LLM spend, then posts incident alerts to Slack, logs incidents and history to Google Sheets, and sends an…

Excerpt from Rahul Joshi's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.