To view the n8n flow demo and copy the JSON you need to purchase our Bundle... don't worry, it's FREE

Go to the BUNDLE

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 (eg, 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 (eg, Send Email - Retail , Send Email - Service ).
  3. Switch Node :

    • Modify cost center values ​​as needed to match your organization (eg, '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 :

    • Replace amjid@amjidali.com with the actual email addresses of the concerned teams.

πŸ“˜ 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

Do you want to automate your business?

Let's talk about your project