Work snippet
Supplier bill capture in n8n, with approval limits and Xero drafts
Concept DesignIllustrative integration walkthrough. Business details, figures and records are worked examples.
Bills land in one shared accounts mailbox. n8n files each PDF, extracts the details, checks the supplier and invoice number against records, and sends it to approvers according to its value. A bill reaches Xero as a draft only after every approval, with the PDF and its approval history attached.
The problemSupplier bills arrive by email, get keyed twice, and Xero lets one person approve any amount.
What changesEach bill is captured once, checked, approved by value, and reaches Xero with its PDF and approval trail.
- Area
- Accounts payable controls
- Tools
- n8n · Xero · Google Drive · Airtable · Slack
- Typical scope
- US$2,500-4,500
- Timeline
- About 5 weeks · fixed milestones
The situation and what was breaking
Forwarding a PDF is not an approval. Finance cannot tell who agreed to pay it, or whether the bank details printed on it match the supplier’s record.
When supplier invoices arrive by email, the same document can be forwarded several times, saved under different names and keyed into Xero more than once. Approvals live in email threads while the PDF sits on somebody's desktop. A changed bank account on a supplier bill can pass without a second look.
Xero's own bill approval is a single step controlled by user role. It has no rule that says a bill over a set value needs a second person, and no reason is kept when a bill is pushed back. This workflow adds that layer in front of Xero and keeps capture, checks, approval and posting as separate steps, each with a record.
- The same bill keyed twice from two forwards
- Approvals scattered across email threads
- No value limit: any approver can pass any amount
- Bank detail changes not flagged
- PDFs not attached to the bill in Xero
- Month-end hunt for bills nobody has approved
What good looks likeEvery supplier bill captured once, approved by the right person for its value, and in Xero with its PDF and its approval trail.
Discovery findings
What a read-only review checks first: three months of the accounts inbox, the Xero bills and supplier list for the same period, and a call with whoever approves spend.
| ID | Finding | Evidence | Risk if left |
|---|---|---|---|
| F1 | Bills keyed by hand from forwarded emails | Same invoice number under two suppliers or twice | Paying a bill twice |
| F2 | No value-based approval | Any Standard user can approve any amount | Large spend passed by one person |
| F3 | Supplier bank details changed by email | No check against the stored account | Payment to the wrong account |
| F4 | PDF kept outside Xero | Bills without attachments | Slow queries, weak audit trail |
| F5 | Account codes chosen per person | Same supplier coded three ways | Unreliable cost reports |
| F6 | No queue of bills waiting for approval | Found at month-end | Late fees, supplier holds |
Architecture: Xero bill approval workflow
n8n runs the flow. Google Drive keeps the original PDF, Airtable holds the approval queue and the supplier rules, Slack carries the approve and reject buttons, and Xero only sees a bill once it is fully approved.
Scroll sideways to see the full drawing
The screens your team will use
Approvers work in Slack and never need a Xero login. Accounts staff work the Airtable queue, where every bill shows its stage, its checks and its PDF.
Open bills · by stage
| Bill | Supplier | Amount | Checks | Stage | Approver |
|---|---|---|---|---|---|
| B-2291 | Supplier 014 | 1,840.00 | Pass | Ops approval | Ops lead |
| B-2292 | Supplier 031 | 612.40 | Duplicate | Held | Accounts |
| B-2293 | Supplier 022 | 6,240.00 | Pass | Second approval | Finance |
| B-2294 | Supplier 007 | 2,115.00 | Bank changed | Held | Finance |
| B-2295 | Supplier 014 | 388.00 | Pass | Approved | Ops lead |
| B-2296 | Supplier 040 | 74.90 | No PO needed | Posted to Xero | Auto, under limit |
Held bills say why. A duplicate links to the bill it matches, a bank change links to the stored account.
Approval needed: Supplier 022, US$6,240.00, second approval.
Approved.
Posted to Xero.
Reject needs a reason, and the reason is kept on the queue row.
A second workflow listens for Slack decisions and posts approved bills to Xero.
How it is built
Capture and checks first, with nothing posted. Approval routing next. Posting to Xero is switched on last, after two weeks of the queue matching what the team would have done by hand.
- Module ACapture
Shared inbox trigger, PDF saved to Drive with a fixed name: supplier, number, date.
- Module BExtraction
Supplier, invoice number, date, due date, subtotal, tax and total read from the PDF; low-confidence fields flagged for a person.
- Module CChecks
Duplicate test on supplier plus number plus total across Xero bills and the queue; bank details compared with the stored account.
- Module DSupplier rules
Default account code, tracking, approver and value limit per supplier, kept in Airtable.
- Module EApproval routing
One approver under the limit, two above it; Slack buttons; reject keeps a reason; reminders after 48 hours.
- Module FPosting
Fully approved bills become Xero drafts with the PDF attached and the approval history in the note.
Field mapping and rules
Two tables carry the logic: the field mapping, and the approval rules. Both can change without touching the workflow.
| From the PDF | Queue field | Xero bill | Rule |
|---|---|---|---|
| Supplier name and number | Supplier (linked) | Contact | Matched to the supplier list, never created silently |
| Invoice number | Bill number | Reference | Part of the duplicate key |
| Invoice and due date | Dates | Date, due date | Due date from terms if missing |
| Line totals and tax | Amounts | Line items | Default account code from supplier rules |
| Bank details | Bank check | None | Must match the stored account or the bill is held |
| Drive link | Attachment | Attached on posting |
| Condition | Route | Result |
|---|---|---|
| Known supplier, under US$500 | Accounts check only | Posted as draft |
| US$500 to US$5,000 | Budget owner | Posted after approval |
| Over US$5,000 | Budget owner, then finance | Posted after both |
| New supplier or bank change | Finance review first | Held until reviewed |
| Duplicate key found | Accounts | Held with a link to the match |
Worked figures
Walkthrough arithmetic for a month of 300 bills through the queue.
Capture to ledger
QA and testing checklist
Every check runs in a copy or on test records first, and each one is ticked with evidence before go-live.
- T1CaptureA test PDF creates one queue row and one Drive file with the fixed name.
- T2ForwardThe same PDF forwarded twice creates one row.
- T3DuplicateA bill matching a Xero bill on supplier, number and total is held with a link.
- T4Bank changeDifferent bank details hold the bill for finance.
- T5Low confidenceAn unreadable total is flagged for a person, not guessed.
- T6LimitsA bill over the limit needs both approvals before posting.
- T7RejectA rejected bill keeps its reason and never reaches Xero.
- T8ReminderAn approval waiting 48 hours sends one reminder.
- T9PostingAn approved bill reaches Xero as a draft with the PDF attached.
- T10AuditThe bill note shows who approved and when.
Scope
| Area | Included |
|---|---|
| Review | Three months of inbox, Xero bills and suppliers, with findings |
| Capture | Inbox trigger, Drive storage, field extraction |
| Checks | Duplicate key and bank detail check |
| Approval | Airtable queue, Slack approvals, value limits, reminders |
| Posting | Xero drafts with PDF and approval history |
| Parallel run | Two weeks of queue alongside the current process |
| Not included | Paying bills, bank file uploads, purchase order systems, or n8n hosting and plan costs |
Milestones, week by week
- Week 1
Review and rules
- Three-month review
- Supplier rules table
- Approval limits agreed
- Week 2
Capture and checks
- Inbox and Drive
- Extraction
- Duplicate and bank checks
- Week 3
Approval
- Airtable queue
- Slack buttons
- Reminders
- Week 4
Parallel run
- Queue beside the old process
- Differences reviewed
- Week 5
Posting and handover
- Xero posting on
- SOP and walkthrough
- 14 days of fixes
Handover and keeping it running
Handover pack
- Workflow map each n8n workflow, node by node
- Supplier rules guide adding a supplier, changing a limit or approver
- Hold runbook what to do with a duplicate, a bank change or a low-confidence field
- Recorded walkthrough from PDF to approved Xero draft
- Access list inbox, Drive, Airtable, Slack and Xero connections in the business's name
- 14 days of fixes for defects in the agreed scope
Keep it running
The rules table is the control. When a supplier changes terms or an approver leaves, update the row before the next bill arrives. Held bills are a signal, never something to clear in bulk.
- Daily: held bills reviewed
- Weekly: bills waiting more than 48 hours chased
- Monthly: supplier rules and limits checked
- When an approver changes: update the rules table first
- Optional support hours at US$35 per hour, agreed in writing
Typical scope for this kind of project: US$2,500-4,500
About 5 weeks · fixed milestones. The systems health check (US$150, fixed) comes first and confirms the scope. Extra hourly work is US$35 per hour, agreed before it starts. After handover, a set block of hours each month is available at the same rate, agreed in writing.
Discuss an engagement.
Outline the operational problem through the contact form. I respond with a recommended starting point, including whether the US$150 systems health check is the appropriate first step.