Automate Project Cost Auditing with MySQL & Outlook in n8n

This n8n workflow automatically detects open external projects with missing budgeted costs from a MySQL database and sends tailored email alerts to respective cost center teams via Microsoft Outlook, preventing costly budgeting oversights.
mySql
scheduleTrigger
switch
+1
Workflow Identifier: 1574
NODES in Use: MySQL, Schedule Trigger, Switch, Microsoft Outlook
Automate cost audits with MySQL and n8n

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Automation Does ⚙️

This workflow finds all open external projects that have no budgeted cost set.

It groups them by company and cost center, then sends an email to each cost center team to notify missing budgets.

The goal is to save time by automating weekly budget checks and improving financial accuracy.

This helps stop errors in reports and delays in decisions when budget data is missing.

It works by using a Schedule Trigger, a MySQL query, routing with a Switch node, and sending emails through Microsoft Outlook nodes.


Inputs, Process, and Outputs

Inputs

  • Project data from a MySQL database with fields like company, cost center, status, and budgeted cost.
  • Weekly trigger signal from the Schedule Trigger node.

Processing Steps

  • Run a SQL query to get active projects with zero budget cost.
  • Group the query results by company and cost center.
  • Use Switch node to split data based on cost center names.
  • Send customized HTML emails to the correct cost center teams via Microsoft Outlook nodes.

Outputs

  • Email notifications sent to cost center owners listing how many projects lack budget info.

Tools and Services Used

  • n8n: Workflow automation platform.
  • MySQL Database: Stores project data queried for missing budgets.
  • Microsoft Outlook API: Sends email alerts.

Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Download and Import Workflow

  1. Download the workflow file using the Download button on this page.
  2. Inside the n8n editor, click on “Import from File”.
  3. Select the downloaded workflow file to load it into your editor.

Step 2: Configure Credentials and Settings

  1. Add your MySQL database credentials to the MySQL node.
  2. Add Microsoft Outlook API credentials to the Outlook nodes.
  3. Check and update cost center email addresses in the Outlook nodes if needed.
  4. Adjust cost center names in the Switch node if your cost centers differ.

Step 3: Test and Activate Workflow

  1. Run the workflow manually once to test data and email sending.
  2. Look at workflow execution logs for errors or missing data.
  3. When satisfied, activate the workflow to run automatically on schedule.
  4. Optionally, monitor initial runs and check email delivery.

Following these steps sets you up for weekly automated budget audits without deep technical work.


Known Edge Cases and Troubleshooting 🔧

Issue: Emails Not Being Sent

Check that cost center names in the Switch node exactly match the database data.

Case or extra spaces can cause routing not to work.

Issue: MySQL Query Errors or Timeouts

Verify database credentials and permissions.

Test the SQL query directly in your database client to make sure it runs without error.


Customization Ideas ✏️

  • Add more cost centers by extending the Switch node and Outlook nodes accordingly.
  • Change email recipients to match your team contacts by editing the Outlook nodes fields.
  • Modify the schedule trigger to run more or less often.
  • Extend the SQL query to include more project details or filter differently.

Pre-production Checklist ✅

  • Test the MySQL query independently for correct results and permissions.
  • Verify Switch node outputs match your actual cost center names exactly.
  • Send sample emails to verify proper formatting and delivery.
  • Confirm the workflow schedule matches your reporting needs.

Deployment Guide

Activate the workflow in n8n after thorough testing.

Check execution logs to catch and debug any errors.

Store all credentials securely and limit access to keep financial notifications safe.

Setting up error notifications or logs will help catch issues early.

If running on your own server, consider self-host n8n for security and control.


Summary

✓ This workflow saves time by automating weekly budget audits.

✓ It finds projects missing budgets and alerts cost center teams by email.

✓ Helps improve financial reports and speeds decision making.

→ User gets ready-to-run automation requiring minimal setup.

→ Emails clearly specify which cost centers need attention.


Automate cost audits with MySQL and n8n

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

The workflow runs a SQL query on the MySQL database to find all active external projects with zero budgeted cost.
Data for that cost center will not be routed correctly, so email alerts may not be sent for those projects.
Yes, the Microsoft Outlook nodes can be replaced with Gmail or SMTP nodes by updating the credentials and settings.
Yes, n8n allows adding error handling or logging nodes and checking execution logs to monitor workflow errors.
Author
Written By
Ritu Sanjali

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.