# Advanced document approval for Microsoft 365 with MySQL: n8n workflow

> Started by another system calling it, and works across Email and MySQL. 27 steps, 2 branches: large, and worth reading before you trust it with anything live.

Source: https://millionrounds.com/workflow/advanced-document-approval-for-microsoft-365-with-mysql (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Documents and files](https://millionrounds.com/workflows?category=Documents+and+files#library)

# Advanced document approval for Microsoft 365 with MySQL

Started by another system calling it, and works across Email and MySQL. 27 steps, 2 branches: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fadvanced-document-approval-for-microsoft-365-with-mysql)

**27 steps** Large: read it before trusting it with anything live

**2** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 3 Logic 8 Service 16

The steps in the order they run, from what starts it.

- 1 **Webhook - SharePoint (file created)** Webhook *Starts it*
- 2 **Webhook - Approve** Webhook *Starts it*
- 3 **Webhook - Reject** Webhook *Starts it*
- 4 **Set Document Fields** Set *Logic*
- 5 **Parse Approve Query** Function *Logic*
- 6 **Parse Reject Query** Function *Logic*
- 7 **Get Approval Matrix (MySQL)** My Sql *Service*
- 8 **Insert Workflow Start History (MySQL)** My Sql *Service*
- 9 **Insert Approve Log (MySQL)** My Sql *Service*
- 10 **Insert Reject Log (MySQL)** My Sql *Service*
- 11 **Approvers Exist?** If *Logic*
- 12 **Get Next Approver (MySQL)** My Sql *Service*
- 13 **Final Update Log (MySQL)** My Sql *Service*
- 14 **Move File to Rejected (SharePoint via Graph)** Http Request *Service*
- 15 **Update Log Rejected (MySQL)** My Sql *Service*
- 16 **Notify HR - Rejected** Email Send *Service*
- 17 **Prepare Approver List** Function *Logic*
- 18 **Move File to Approved (SharePoint via Graph)** Http Request *Service*
- 19 **Create ClickUp Task - Approved** Http Request *Service*
- 20 **Notify HR - Approved** Email Send *Service*
- 21 **Has Next Approver?** If *Logic*
- 22 **Set First Approver Info** Set *Logic*
- 23 **Prepare Next Approver Info** Function *Logic*
- 24 **Send Email to Approver (Level 1)** Email Send *Service*
- 25 **Insert Approval Request Log** My Sql *Service*
- 26 **Send Email to Next Approver** Email Send *Service*
- 27 **Get Approval Logs (MySQL)** My Sql *Service*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 27, with 2 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Email, MySQL
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Email and MySQL accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 27 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 27 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fadvanced-document-approval-for-microsoft-365-with-mysql)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Email](https://millionrounds.com/workflows?service=Email#library)[MySQL](https://millionrounds.com/workflows?service=MySQL#library)

## Workflows like it

Also documents and files, with the same services where possible, closest in size first.

- [**Automate commercial insurance submissions with Google Suite** 29 steps · Email, Google Docs](https://millionrounds.com/workflow/automate-commercial-insurance-submissions-with-google-suite)
- [**Audit contract governance risk with OpenAI and Slack** 24 steps · calls a model · Email, Slack](https://millionrounds.com/workflow/audit-contract-governance-risk-with-openai-and-slack)
- [**Extract and classify legal documents with Claude** 31 steps · calls a model · Email, Google Sheets](https://millionrounds.com/workflow/extract-and-classify-legal-documents-with-claude)
- [**Auto-file emailed documents to Clio matters in Google Drive** 21 steps · Email, Google Drive](https://millionrounds.com/workflow/auto-file-emailed-documents-to-clio-matters-in-google-drive)
- [**Restore workflows and credentials from remote FTP backup storage** 20 steps · Email, FTP](https://millionrounds.com/workflow/restore-workflows-and-credentials-from-remote-ftp-backup-sto)
- [**LinkedIn profile finder with Bright Data and OpenAI** 19 steps · calls a model · Email](https://millionrounds.com/workflow/linkedin-profile-finder-with-bright-data-and-openai)
