Skip to main content

Monitor data quality with Notion rules, SQL checks & AI-powered alerts

Workflow preview

Workflow preview
100%
Monitor data quality with Notion rules, SQL checks & AI-powered alerts preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Description This workflow continuously validates data quality using rules stored in Notion, runs anomaly checks against your SQL database, generates AI powered diagnostics, and alerts your team onl...

Best for

  • Document Extraction automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.postgres, n8n-nodes-base.code, n8n-nodes-base.set, n8n-nodes-base.notion, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.splitinbatches, n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Yassin Zehar.

Original n8n.io source

1.1 Workflow description

Title
Monitor data quality with Notion rules, SQL checks & AI-powered alerts
Workflow name
Monitor data quality with Notion rules, SQL checks & AI-powered alerts

Description

This workflow continuously validates data quality using rules stored in Notion, runs anomaly checks against your SQL database, generates AI-powered diagnostics, and alerts your team only when real issues occur.

Notion holds all data quality rules (source, field, condition, severity). n8n reads them on schedule, converts them into live SQL queries, and aggregates anomalies into a global run summary.

The workflow then scores data health, creates a Notion run record, optionally opens a Jira issue, and sends a Slack/email alert including AI-generated root cause & recommended fixes.

Target users

Perfect for:

  • DataOps
  • Analytics
  • Product Data
  • BI
  • Compliance
  • ETL/ELT pipelines
  • Platform reliability teams.

Workflow steps

How it works

  1. Notion → Rules Database Each entry defines a check (table, field, condition, severity).

  2. n8n → Dynamic Query Execution Rules are converted into SQL and checked automatically.

  3. Summary Engine Aggregates anomalies, computes data quality score.

  4. AI Diagnostic Layer Root cause analysis + recommended fix plan.

  5. Incident Handling Notion Run Page + optional Slack/Email/Jira escalation. Silent exit when no anomaly = zero noise.

Setup Instructions

  • Create two Notion databases:
    • Data Quality Rules → source / field / rule / severity / owner

    • Data Quality Runs → run_id / timestamp / score / anomalies / trend / AI summary/recommendation

  • Connect SQL database (Postgres / Supabase / Redshift etc.)
  • Add OpenAI credentials for AI analysis
  • Connect Slack + Gmail + Jira for incident alerts
  • Set your execution schedule (daily/weekly)

Expected outcomes

  • Fully automated, rule-based data quality monitoring with minimal maintenance and zero manual checking.
  • When everything is healthy, runs remain silent.
  • When data breaks, the team is notified instantly: with context, root cause insight, and a structured remediation output.

Tutorial video

Watch the Youtube Tutorial video

About me :

I’m Yassin a Project & Product Manager Scaling tech products with data-driven project management. 📬 Feel free to connect with me on Linkedin

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Product anomalies

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 2 - check orders

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 3 - build summary

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - run metadata

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - Data quality run page

Type / Role
n8n-nodes-base.notion - notion
Config choices
Version 2.2

Block 6 - AI analysis and recommendation

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 2

Block 7 - calculate trend

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Autofix simulation

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - split batch

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 10 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Daily trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 15 - Get database data

Type / Role
n8n-nodes-base.notion - notion
Config choices
Version 2.2

Block 16 - Switch module

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.3

Block 17 - Issue condition

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 18 - Data condition

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 19 - Jira issue

Type / Role
n8n-nodes-base.jira - jira
Config choices
Version 1

Block 20 - Slack message alert

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 21 - Email reporting

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

3. Summary Table

Workflow Monitor data quality with Notion rules, SQL checks & AI-powered alerts
Complexity advanced
Nodes 21
Categories Document Extraction, AI Summarization
Author Yassin Zehar
Published 26 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11256/11256.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Monitor data quality with Notion rules, SQL checks & AI-powered alerts do?

Description This workflow continuously validates data quality using rules stored in Notion, runs anomaly checks against your SQL database, generates AI powered diagnostics, and alerts your team onl...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI Summarization use case.