Score PostgreSQL table data quality and send issue alerts to Slack
Ready for 3.0What this workflow does
This workflow has 18 nodes and runs manually, when you click “Execute workflow” (plus 2 other triggers). Along the way it connects Postgres.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 2 other triggers).
- Postgres: run a query
- Set DQ Config (Edit Fields (Set)): sets 16 fields: tableName, pkColumn, timestampColumn…
- Code: runs custom JavaScript code
- Config Valid? (If): checks a condition and branches into true / false
- Postgres: run a query
- HTTP - Slack Config Error Alert (HTTP Request): calls an HTTP API (POST)
- Postgres: run a query
- Postgres: run a query
- Postgres: run a query
- Code: runs custom JavaScript code
…plus 5 more steps. See the full node list below.
Services it uses
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 (8)
- Manual Trigger
n8n-nodes-base.manualTrigger - Postgres
n8n-nodes-base.postgres - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest
From the author
Quick Overview This workflow runs hourly or via a webhook to scan a PostgreSQL table for missing required values, duplicate business keys, numeric anomalies, and table health issues, then stores run history and issues in PostgreSQL and sends Slack alerts only…