Templates / Monitor KPI anomalies with Postgres, Slack, Gmail, GitHub and Claude

Monitor KPI anomalies with Postgres, Slack, Gmail, GitHub and Claude

Ready for 3.0

by Mina Saad ✓ · 15 views · created 2026-09-21 · Engineering, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 58 nodes and runs manually, when you click “Execute workflow” (plus 4 other triggers). Along the way it connects Postgres, Slack, OpenRouter Chat Model and GitHub and 1 more.

How it runs

Trigger: Manually, when you click “Execute workflow” (plus 4 other triggers).

  1. Load Metric Registry (Postgres): run a query
  2. Detection Settings (Edit Fields (Set)): sets 6 fields: critical_channel, warning_channel, oncall_email…
  3. Validate Feedback (Code): runs custom JavaScript code
  4. Report Settings (Edit Fields (Set)): sets 4 fields: report_email, report_channel, window_days…
  5. Run Metric Query (Postgres): run a query
  6. Fetch Latest Vs Baseline (Postgres): run a query
  7. Feedback Valid (If): checks a condition and branches into true / false
  8. Query Alert Precision (Postgres): run a query
  9. Build Observation (Code): runs custom JavaScript code
  10. Score Anomalies (Code): runs custom JavaScript code

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

Services it uses

PostgresSlackOpenRouter Chat ModelGitHubGmail

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 (20)

From the author

Quick overview This workflow collects daily KPIs in Postgres, builds robust baselines, detects anomalies each morning, and then investigates them with an OpenRouter (Claude) agent using Postgres and GitHub tools before routing alerts to Slack, GitHub Issues,…

Excerpt from Mina Saad'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.