Skip to main content
Lifetime license included with every purchase
n8n workflowspayroll automationfinance automationapproval routing

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.

Nn8n Marketplace Team·September 6, 2026·Updated September 6, 2026·8 min read

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.

Never auto-distribute payroll

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

NodePurpose
n8n-nodes-base.scheduleTriggerFire the run on the pay date
n8n-nodes-base.googleSheetsRead employee data, write the audit log
n8n-nodes-base.codeValidation, gross-to-net math, reconciliation
n8n-nodes-base.slackPost the run summary and the approve link
n8n-nodes-base.waitHold the workflow on the approval webhook
n8n-nodes-base.gmailSend payslips after sign-off
n8n-nodes-base.httpRequestGenerate 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

  1. 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.
  2. Write validation before any math. Numeric hours, present IDs, no duplicates. Test it against a deliberately broken row that pays zero.
  3. Build the gross-to-net Code node and run it on real data. Eyeball the per-employee output before you wire anything downstream.
  4. Add the reconciliation check. Sum of net versus expected. Make it halt the run on a mismatch, not just warn.
  5. 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.
  6. Log who approved what. Every run gets the approver, the timestamp, and the totals. Payroll you can't audit is payroll you'll regret.
Browse the approval-routing templates
Skip the build

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.

Get the Routine Decision Rule Engine

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
FAQ

Common questions

Can n8n automate payroll end to end without a human checking it?
It can, but it shouldn't. Payroll is the one workflow where a silent error pays the wrong amount to a real person, and you find out when they message you. A good n8n payroll automation pauses at a sign-off gate after it calculates and reconciles, and only distributes payslips once someone approves the run. The automation does the gathering, the math, and the variance check. A human still owns the decision to release money.
How do you add an approval step to an n8n payroll workflow?
Split the workflow in two. The first half calculates net pay, reconciles gross-to-net, and posts a summary (totals, headcount, and any flagged variances) to Slack or email with an approve link. The second half — payslip generation and distribution — runs only when that approval fires. A Wait node holding on a webhook, or a simple approved flag in a Google Sheet that a Schedule trigger re-checks, both work. The Routine Decision Rule Engine template wires this auto-approve-or-escalate logic out of the box.
What's the most common n8n payroll mistake?
Trusting the input sheet. A blank hours cell reads as zero pay, a duplicated employee row pays someone twice, and a text value where a number belongs makes the net-pay math fail silently. Validate every row before the calculation runs, and reconcile the sum of net payments against expected gross minus deductions before the sign-off gate. The reconciliation catches the math errors; the validation catches the data errors.
Stop reading. Start running.

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.

Free — $40 value

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