Detect and self-heal data pipeline incidents with PostgreSQL, Claude and Slack
Ready for 3.0What 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).
- Set Pipeline Parameters (Edit Fields (Set)): sets 8 fields: nullThreshold, outlierIQRMultiplier, slackChannel…
- Fetch Latest Data from PostgreSQL (Postgres): run a query
- Run Statistical Quality Checks (Code): runs custom JavaScript code
- Fetch Historical Baseline Data (Postgres): run a query
- Check If Anomaly Detected (If): checks a condition and branches into true / false
- Compare with Historical Baseline (Code): runs custom JavaScript code
- AI Anomaly Classifier Agent (Anthropic): uses Anthropic
- Calculate Trend Analysis Metrics (Code): runs custom JavaScript code
- AI Remediation Planner Agent (Anthropic): uses Anthropic
- 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
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)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Postgres
n8n-nodes-base.postgres - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Anthropic
@n8n/n8n-nodes-langchain.anthropic - Switch
n8n-nodes-base.switch - Slack
n8n-nodes-base.slack - HTTP Request
n8n-nodes-base.httpRequest - Aggregate
n8n-nodes-base.aggregate
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…