Templates / Detect and self-heal data pipeline incidents with PostgreSQL, Claude and Slack

Detect and self-heal data pipeline incidents with PostgreSQL, Claude and Slack

Ready for 3.0

by ResilNext ✓ · 3 views · created 2026-08-29 · 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 33 nodes and runs on a schedule (every 15 minutes). Along the way it connects Postgres, Anthropic and Slack. It also calls api.pagerduty.com and api.datadoghq.com over HTTP.

How it runs

Trigger: On a schedule (every 15 minutes).

  1. Set Pipeline Parameters (Edit Fields (Set)): sets 8 fields: nullThreshold, outlierIQRMultiplier, slackChannel…
  2. Fetch Latest Data from PostgreSQL (Postgres): run a query
  3. Run Statistical Quality Checks (Code): runs custom JavaScript code
  4. Fetch Historical Baseline Data (Postgres): run a query
  5. Check If Anomaly Detected (If): checks a condition and branches into true / false
  6. Compare with Historical Baseline (Code): runs custom JavaScript code
  7. AI Anomaly Classifier Agent (Anthropic): uses Anthropic
  8. Calculate Trend Analysis Metrics (Code): runs custom JavaScript code
  9. AI Remediation Planner Agent (Anthropic): uses Anthropic
  10. Check If Critical Severity (If): checks a condition and branches into true / false

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

Services it uses

PostgresAnthropicSlack

HTTP calls to: api.pagerduty.com, api.datadoghq.com

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)

From the author

Quick Overview This workflow runs every 15 minutes to pull recent records from PostgreSQL, detect data quality anomalies, and use Anthropic Claude to classify issues and plan remediation. It executes corrective actions, sends Slack and PagerDuty alerts, logs…

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