Monitor SQL data quality and send email reports with Google Sheets logging
Ready for 3.0What this workflow does
This workflow has 10 nodes and runs on a schedule (every 24 hours). Along the way it connects Postgres, Google Sheets and Gmail.
How it runs
Trigger: On a schedule (every 24 hours).
- Config (Edit Fields (Set)): sets 11 fields: tableName, nullCheckCol, duplicateCheckCol…
- Null Check (Postgres): run a query
- Duplicate Check (Postgres): run a query
- Row Count (Postgres): run a query
- Outlier Check (Postgres): run a query
- Merge: merges the data from its input branches
- Evaluate & Format (Code): runs custom JavaScript code
- Log to Google Sheets (Google Sheets): append
- Send a message (Gmail): uses Gmail
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other Gmail + PostgreSQL templates (82) · Other Google Sheets + PostgreSQL templates (71)
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 (7)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Postgres
n8n-nodes-base.postgres - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - Gmail
n8n-nodes-base.gmail
From the author
This workflow automatically monitors and reports data quality for any SQL table using configurable checks and thresholds. It evaluates key metrics—including null values, duplicate records, row count anomalies, and outliers—and assigns a clear PASS, WARN, or…