n8n PostgreSQL Data Quality Check & Slack Alerts
n8n PostgreSQL Data Quality Check & Slack Alerts
Regular price
£23.99
Regular price
£23.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n PostgreSQL Data Quality Check & Slack Alerts
Regular price
£23.99
Regular price
£23.99
Sale price
Unit price
/
per
Catch PostgreSQL data problems early—then notify your team in Slack
This n8n workflow automatically scans a PostgreSQL table for missing required values, duplicate business keys, numeric anomalies, and table health issues—and writes run history to PostgreSQL. It sends Slack alerts only when attention is needed, so you stay informed without constant noise.
What this workflow does
-
Runs hourly on a schedule or starts on demand when a POST request is sent to the
/dq-runwebhook. - Loads and validates configuration (table name, key columns, required columns, numeric columns, thresholds, and Slack webhook URL) before generating the SQL checks.
-
Checks PostgreSQL data quality for:
- Missing required values
- Duplicate business keys (optionally normalized)
- Numeric outliers using a robust z-score
- Table health stats, including row counts and timestamp freshness
- Scores results across completeness, uniqueness, validity, and timeliness—classifying each run as pass/warn/fail/error and selecting the most important issues.
-
Persists outcomes by writing a run summary to
dq_runsand inserting only newly observed issues intodq_issues. - Optionally auto-resolves issues that no longer appear after a full scan.
- Alerts in Slack only when needed (fails/errors, critical issues, or new warnings); otherwise it stays quiet.
Use cases
- Detect missing fields or invalid values before they break downstream pipelines.
- Monitor duplicate business keys after upstream changes.
- Flag numeric anomalies (robust z-score) in reporting or billing datasets.
- Ensure table freshness by alerting when timestamps stop updating.
Technical details
- n8n nodes/blocks used: if, set, code, webhook, postgres, sticky note
- Integrations: PostgreSQL (dq_runs, dq_issues; optional dq_demo_orders) and Slack via webhook
-
Setup: add PostgreSQL credentials and run the manual setup to create required tables, then update configuration values like
tableName,pkColumn, andtimestampColumn.
