Monitor PostgreSQL data quality and generate remediation alerts with Slack
Ready for 3.0What this workflow does
This workflow has 15 nodes and runs on a schedule (every 6 hours). Along the way it connects Postgres and Slack.
How it runs
Trigger: On a schedule (every 6 hours).
- Workflow Configuration (Edit Fields (Set)): sets 5 fields: confidenceThreshold, maxNullPercentage, outlierStdDevThreshold…
- Get Schema Metadata (Postgres): run a query
- Get Table Statistics (Postgres): run a query
- Get Historical Baselines (Postgres): run a query
- Detect Schema Drift (Code): runs custom Python code
- Detect Null Explosions (Code): runs custom Python code
- Detect Outlier Distributions (Code): runs custom Python code
- Combine All Issues (Aggregate): combines items into one
- Calculate Confidence Scores (Code): runs custom Python code
- Check Confidence Threshold (If): checks a condition and branches into true / false
…plus 4 more steps. See the full node list below.
Services it uses
Other PostgreSQL + Slack templates (109)
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (7)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Postgres
n8n-nodes-base.postgres - Code
n8n-nodes-base.code - Aggregate
n8n-nodes-base.aggregate - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack
From the author
Autonomous PostgreSQL Data Quality Monitoring & Remediation Overview This workflow automatically monitors PostgreSQL database data quality and detects structural or statistical anomalies before they impact analytics, pipelines, or applications. Running every…