Skip to main content

Send weekly SQL Server health reports via email

Workflow preview

Workflow preview
100%
Send weekly SQL Server health reports via email preview
Open on n8n.io

1. Workflow Overview

Description This workflow runs every Monday morning and automatically diagnoses the health of your SQL Server database across 4 dimensions — slow queries, missing indexes, index fragmentation, and ...

Best for

  • DevOps automation workflows
  • AI Summarization automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.microsoftsql, n8n-nodes-base.merge, n8n-nodes-base.code, n8n-nodes-base.emailsend, n8n-nodes-base.stickynote

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Send weekly SQL Server health reports via email
Workflow name
Send weekly SQL Server health reports via email
Description

This workflow runs every Monday morning and automatically diagnoses the health of your SQL Server database across 4 dimensions — slow queries, missing indexes, index fragmentation, and server wait stats. It merges all results, scores each finding by severity, and sends a beautifully formatted HTML email report only when issues are found. Zero noise when everything is healthy.

Who it's for

SQL Server developers, DBAs, and backend engineers who manage production MSSQL databases and want weekly automated diagnostics delivered to their inbox — without manual querying or third-party monitoring tools.

How it works:

  1. Schedule Trigger fires every Monday at 7 AM.

  2. 4 SQL nodes run in parallel — slow queries, missing indexes, index fragmentation, wait stats.

  3. Merge node combines all results into a single stream.

  4. Code node filters by field signature, scores severity (critical/warning), and builds the HTML email.

  5. Send Email dispatches the report only when issues exist.

⚙️ Setup required:

• Add MSSQL credential with VIEW SERVER STATE permission

• Add SMTP or Gmail credential for email

• Adjust severity thresholds in the Code node to match your workload

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 - Schedule Trigger

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

Block 2 - top slow queries

Type / Role
n8n-nodes-base.microsoftSql - microsoftSql
Config choices
Version 1.1

Block 3 - missing indexes

Type / Role
n8n-nodes-base.microsoftSql - microsoftSql
Config choices
Version 1.1

Block 4 - index fragmentation

Type / Role
n8n-nodes-base.microsoftSql - microsoftSql
Config choices
Version 1.1

Block 5 - blocking & wait stats

Type / Role
n8n-nodes-base.microsoftSql - microsoftSql
Config choices
Version 1.1

Block 6 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 7 - Code in JavaScript

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

Block 8 - Send email

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

Block 9 - Sticky Note

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

Block 10 - Sticky Note1

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

Block 11 - Sticky Note2

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

Block 12 - Sticky Note3

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

3. Summary Table

Workflow Send weekly SQL Server health reports via email
Complexity intermediate
Nodes 12
Categories DevOps, AI Summarization
Author Mohamed Abubakkar
Published 23 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15256/15256.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 Send weekly SQL Server health reports via email do?

Description This workflow runs every Monday morning and automatically diagnoses the health of your SQL Server database across 4 dimensions — slow queries, missing indexes, index fragmentation, and ...

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 DevOps, AI Summarization use case.