n8n Payroll Automation: Reconcile and Sign Off Before Payslips Go Out
Build an n8n payroll automation workflow that reconciles gross-to-net and waits for human sign-off before any payslip is sent. No silent auto-pay runs.
The payroll demos all stop at the satisfying part. Pull employee data from a sheet, calculate net pay with an AI node, generate a PDF, email it out. Beautiful. Then payroll runs for real, a contractor's hours cell is blank, the workflow reads it as zero, and an actual person opens a payslip for $0.00 on a Friday afternoon.
An n8n payroll automation that you'd trust with real money looks different from the templates that rank. It still gathers, calculates, and distributes. But it reconciles the numbers and waits for a human to sign off before a single payslip leaves the building. The automation removes the tedium. It doesn't remove the accountability.
That distinction is the whole post. Everything else is plumbing.
What You Can Automate in Payroll
The parts that automate safely, and the one part that shouldn't:
- Pulling hours, salaries, and deduction rules from a source sheet or HR system
- Validating every row before any math touches it
- Calculating gross, deductions, and net per employee in a Code node
- Reconciling the run total against expected gross minus deductions
- Posting a run summary to Slack with the totals and any flagged variances
- Holding for a human approval before distribution
- Generating and emailing payslip PDFs only after sign-off
- Logging the whole run to an audit sheet with who approved it and when
Notice where the human sits. Not at the start, doing data entry. At the gate, deciding whether the reconciled run is right.
The Payroll Pipeline
The shape that keeps a bad number from becoming a bad payment:
Trigger → Validate → Calculate → Reconcile → Approve (human) → Distribute → Log
A concrete monthly run, split across the approval gate:
Schedule Trigger v1.2 (cron: 0 9 28 * *)
→ Google Sheets v4: read employee + hours + deduction rows
→ Code v2 (jsCode): validate (numeric hours, no dupes, required fields present)
→ Code v2 (jsCode): gross → deductions → net per employee
→ Code v2 (jsCode): reconcile sum(net) vs sum(gross) - sum(deductions)
→ Slack v2: post run summary + variances + approve link
→ Wait v1.1: pause on approval webhook
--- gate ---
→ HTML/PDF node: generate payslip per employee
→ Gmail v2: send payslip to each employee
→ Google Sheets v4: append run log (approver, timestamp, totals)
The reconciliation step is the one most templates skip, and it's the cheapest insurance in the workflow. If the sum of net payments doesn't equal expected gross minus expected deductions, something upstream is wrong, and you want to know before the payslips render, not after.
The n8n.io payroll templates that rank — the GPT-4 payslip generator and the payroll-tax-compliance flow — both run start to finish with no human checkpoint. That's fine for a demo. In production it means a single bad sheet cell becomes a wrong payslip in someone's inbox, and the first you hear of it is the reply. Put a sign-off gate between calculation and distribution. Always.
Step-by-Step Breakdown
1. Gather the inputs
Read employees, hours or salaries, and the deduction rules into one branch. Keep the deduction logic in data (a rules tab), not hardcoded in a node, so a tax-rate change is a sheet edit and not a workflow edit.
2. Validate every row
A Code node checks each row before the math: are hours numeric, is the employee ID present, is this a duplicate of a row already seen? Reject failures to a separate output and alert on them. A blank hours cell that reads as zero is the classic silent payroll bug.
3. Calculate gross to net
One Code node does the arithmetic per employee: gross from hours or salary, apply deductions, produce net. Keep it deterministic. There's no reason to ask a language model to do multiplication it can get subtly wrong.
4. Reconcile the run
Before anyone sees a number, check the totals against themselves. Sum of net should equal sum of gross minus sum of deductions, give or take rounding you can account for. A mismatch here means a row slipped through validation or a rule is wrong. Stop and flag.
5. Gate on human sign-off
Post the reconciled summary — headcount, total gross, total net, and any flagged rows — to Slack or email with an approve action. The workflow holds. Distribution doesn't happen until a person who can read those totals says yes.
Implementation Patterns That Hold Up
Pattern 1: Reconcile before you render. The check is a few lines, and it runs before any payslip generation.
Code v2 (jsCode):
const totalNet = rows.reduce((s, r) => s + r.net, 0);
const expected = rows.reduce((s, r) => s + r.gross - r.deductions, 0);
if (Math.abs(totalNet - expected) > 0.01) {
return [{ json: { halt: true, totalNet, expected } }];
}
return rows;
The penny tolerance absorbs legitimate rounding. Anything larger is a real discrepancy, and the halt flag routes the run to an alert instead of the distribution branch.
Pattern 2: The approval gate as two workflows. Calculation and distribution don't have to live in one execution. The cleaner build posts the summary, writes an approved: false row, and ends. A second workflow on a Schedule trigger re-reads that row, and when it flips to true, it distributes. This survives n8n restarts in a way a long-lived Wait node sometimes doesn't, which matters when the gap between "calculated" and "approved" is hours, not seconds.
Pattern 3: Auto-approve the boring runs, escalate the odd ones. Most payroll runs are identical to last month. If totals are within a small band of the prior run and no row was flagged, a rule can approve automatically and only escalate the runs that look different. That's exactly the auto-approve-low-risk, escalate-high-risk pattern, and it's where the Routine Decision Rule Engine earns its place.
n8n Nodes You'll Use Most
| Node | Purpose |
|---|---|
n8n-nodes-base.scheduleTrigger | Fire the run on the pay date |
n8n-nodes-base.googleSheets | Read employee data, write the audit log |
n8n-nodes-base.code | Validation, gross-to-net math, reconciliation |
n8n-nodes-base.slack | Post the run summary and the approve link |
n8n-nodes-base.wait | Hold the workflow on the approval webhook |
n8n-nodes-base.gmail | Send payslips after sign-off |
n8n-nodes-base.httpRequest | Generate the payslip PDF via a render service |
The three Code nodes are the spine: validate, calculate, reconcile. Keep them separate. When a payroll run looks wrong, you want to know which of the three caught it without unpicking a single tangled node.
Getting Started
- Put deduction rules in a sheet, not in a node. A rules tab makes a rate change a data edit. Hardcoding it means a workflow edit every quarter.
- Write validation before any math. Numeric hours, present IDs, no duplicates. Test it against a deliberately broken row that pays zero.
- Build the gross-to-net Code node and run it on real data. Eyeball the per-employee output before you wire anything downstream.
- Add the reconciliation check. Sum of net versus expected. Make it halt the run on a mismatch, not just warn.
- Insert the sign-off gate. Post the summary, hold, distribute only on approval. This is the step that separates a payroll automation from a payroll accident.
- Log who approved what. Every run gets the approver, the timestamp, and the totals. Payroll you can't audit is payroll you'll regret.
The Routine Decision Rule Engine & Approval Bot ships the sign-off half this workflow lives or dies on: it auto-approves low-risk runs against your rules, escalates anything outside the band to Slack, and logs every decision to Google Sheets for a full audit trail — exactly the approve-or-escalate gate that keeps a bad payroll run from auto-distributing. It's part of The Complete n8n Templates Bundle, a one-time lifetime license to the whole catalog (plus every template added later) if you run more than one of these finance automations.
A caveat worth stating plainly: payroll touches tax and labor law that varies by jurisdiction, and no workflow absolves you of getting the rules right. Automate the gathering, the math, and the variance check. Keep a human, and ideally an accountant, on the rules and the final approval.
If your payroll feeds a wider finance setup, the n8n finance automation guide covers the surrounding AR and AP flows, and the n8n HR automation guide ties payroll back to onboarding and offboarding so a departed employee stops accruing pay automatically.
Build the reconciliation and the gate first. The payslip PDF is the easy part. The number on it being right, and someone having checked, is the part that actually matters.
See more finance templates →Common questions
Can n8n automate payroll end to end without a human checking it?
How do you add an approval step to an n8n payroll workflow?
What's the most common n8n payroll mistake?
Get the workflow templates this guide is built on
Import-ready n8n JSON, step-by-step setup, and tested end-to-end. One-time payment, own it forever.
Get 3 tested n8n templates, free
The full customer package for three real catalog templates — workflow JSON, step-by-step setup guide, credential checklist. Built through the same live-instance release process as everything we sell. Plus new templates and automation guides in your inbox. No spam, unsubscribe anytime.
- 01Smart To-Do List ManagerPre-built n8n workflow template that automates productivity with OpenAI. Live in about 10 minutes.$14
- 02Email Follow-Up AutomatorPre-built n8n workflow template that automates crm with OpenAI. Live in about 15 minutes.$12
- 03Market Trend AnalyzerPre-built n8n workflow template that automates data processing with OpenAI. Live in about 10 minutes.$14
More automation guides

n8n Data Enrichment Workflow: Cache, Fallback, Retry
Enrichment is where API bills sneak up on you. Every lead that needs a company size, a tech stack, or a verified email is a paid lookup, and a naive workflow re-buys data it already has every time it…

n8n Sync API to Google Sheets: Pagination, Upsert, Quotas
The promise is simple: data lives in some API, you want it in a Google Sheet your team already lives in. The reality has three traps: the API paginates and you only grab page one, re-runs duplicate ev…

n8n Scheduled Data Export: Cron, CSV, and Auto-Cleanup
Exports are the kind of automation nobody thinks about until the storage bill spikes or someone asks for "last Tuesday's data" and it's gone. An n8n scheduled data export turns the recurring "pull the…