Skip to main content

Automated weekly project cost reports with MySQL and Outlook HTML emails

Workflow preview

Workflow preview
100%
Automated weekly project cost reports with MySQL and Outlook HTML emails preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Automated Weekly Project Cost Reports with MySQL and Outlook HTML Emails Use Case Need to keep your finance or operations team updated on missing project costs? This practical automated report w...

Best for

  • Document Extraction automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.mysql, n8n-nodes-base.scheduletrigger, n8n-nodes-base.switch, n8n-nodes-base.microsoftoutlook

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Automated weekly project cost reports with MySQL and Outlook HTML emails
Workflow name
Automated weekly project cost reports with MySQL and Outlook HTML emails

Automated Weekly Project Cost Reports with MySQL and Outlook HTML Emails

🧠 Use Case

Need to keep your finance or operations team updated on missing project costs?
This practical automated report workflow does the job without AI β€” and saves hours weekly.

  • Runs on a weekly schedule
  • Queries your MySQL database for projects missing cost data
  • Filters by budgeted_project_cost IS NULL
  • Generates a clean HTML email report
  • Sends it through Microsoft Outlook to relevant teams

πŸš€ How It Works

  1. Schedule Trigger – Runs every Monday at 8 AM
  2. MySQL Node – Connects and runs SQL to fetch project data missing budgeted_project_cost
  3. Switch Node – Routes logic based on cost_center (e.g., Retail, Service, Projects)
  4. Outlook Nodes – Sends formatted HTML emails; each node handles a specific group
  5. Dynamic Content – Inject values using mustache tags like {{ $json.project_name }}

πŸ”§ Setup Instructions

  1. MySQL Setup:

    • Ensure the MySQL node is connected using a valid credential set:
      • Hostname/IP
      • Port (default: 3306)
      • Database name
      • Username with SELECT permissions
      • Password
    • Query Example:
      SELECT project_name, cost_center FROM tabProject 
      WHERE status = 'Open' AND project_type = 'External' AND budgeted_project_cost IS NULL;
      
  2. Outlook Configuration:

    • Connect your Microsoft Outlook node using OAuth2 credentials.
    • Rename each Outlook node clearly (e.g., Send Email - Retail, Send Email - Service).
  3. Switch Node:

    • Modify cost center values as needed to match your organization (e.g., 'Retail', 'Service', 'Projects').
  4. HTML Email Formatting:

    • Customize the HTML message body using inline styles and mustache syntax.
    • Sample:
      <h3>Missing Budgeted Cost Report</h3>
      <ul>
        <li>Project: {{ $json.project_name }}</li>
        <li>Cost Center: {{ $json.cost_center }}</li>
      </ul>
      
  5. Recipients:

πŸ“˜ Read More

πŸ‘‰ Why Simple Workflows Work

πŸ“Ί Demo & Tutorial

πŸŽ₯ Watch the video walkthrough:
https://youtube.com/@syncbricks


πŸ‘€ About the Creator

Amjid Ali
🌐 amjidali.com
πŸ“˜ n8n Book
πŸŽ“ Learn n8n

> β€œStart simple, scale smart. Even basic workflows like this can save your team hours!” β€” Amjid Ali

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 - MySQL

Type / Role
n8n-nodes-base.mySql - mySql
Config choices
Version 2.4

Block 2 - Schedule Trigger

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

Block 3 - Switch

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

Block 4 - Microsoft Outlook6

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

Block 5 - Microsoft Outlook1

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

Block 6 - Microsoft Outlook7

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

3. Summary Table

Workflow Automated weekly project cost reports with MySQL and Outlook HTML emails
Complexity intermediate
Nodes 6
Categories Document Extraction
Author Amjid Ali
Published 07 Apr 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3453/3453.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 Automated weekly project cost reports with MySQL and Outlook HTML emails do?

Automated Weekly Project Cost Reports with MySQL and Outlook HTML Emails Use Case Need to keep your finance or operations team updated on missing project costs? This practical automated report w...

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 use case.