Manaz Afzal Book a consultation

Work snippet

Supplier bill capture in n8n, with approval limits and Xero drafts

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.

What a read-only review checks firstWeek 1
IDFindingEvidenceRisk if left
F1Bills keyed by hand from forwarded emailsSame invoice number under two suppliers or twicePaying a bill twice
F2No value-based approvalAny Standard user can approve any amountLarge spend passed by one person
F3Supplier bank details changed by emailNo check against the stored accountPayment to the wrong account
F4PDF kept outside XeroBills without attachmentsSlow queries, weak audit trail
F5Account codes chosen per personSame supplier coded three waysUnreliable cost reports
F6No queue of bills waiting for approvalFound at month-endLate 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

Supplier bill capture architectureShared inbox to n8n; PDF stored in Google Drive; fields extracted and checked against supplier rules and existing Xero bills; Airtable approval queue routes by value to one or two approvers in Slack; approved bills become Xero drafts with the PDF attached.020040060080new emailstore PDFchecked billfile linkroute by valuedecisionfully approvedA · CAPTUREAccounts inboxPDF bills fromsuppliersB · n8nRead and checkFields, supplier,duplicate testC · SOURCEGoogle DriveOriginal PDF,fixed file nameD · QUEUEAirtableApproval queue,supplier rulesE · APPROVESlackApprove or rejectwith a reasonF · LEDGERXeroDraft bill withPDF attacheda duplicate or bank changestops here with a reasonXero sees a bill only after the last approvalACCOUNTS PAYABLE · CONTROLSManaz Afzal
Capture once, check, approve by value, then postSolid: live data path · Dashed: exception path

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.

Airtable · Bill approval queue6 open

Open bills · by stage

BillSupplierAmountChecksStageApprover
B-2291Supplier 0141,840.00PassOps approvalOps lead
B-2292Supplier 031612.40DuplicateHeldAccounts
B-2293Supplier 0226,240.00PassSecond approvalFinance
B-2294Supplier 0072,115.00Bank changedHeldFinance
B-2295Supplier 014388.00PassApprovedOps lead
B-2296Supplier 04074.90No PO neededPosted to XeroAuto, under limit

Held bills say why. A duplicate links to the bill it matches, a bank change links to the stored account.

Slack · #bill-approvals1 waiting
AP
Bill bot

Approval needed: Supplier 022, US$6,240.00, second approval.

B-2293 · Materials · job 4471First approval by Ops lead, Mon 16:02. Over the US$5,000 limit, so finance approves too. PDF and coding attached.
ApproveReject with reasonOpen PDF
FN
Finance

Approved.

AP
Bill bot

Posted to Xero.

Draft bill created, PDF attachedReference B-2293. Approval history written to the bill note.

Reject needs a reason, and the reason is kept on the queue row.

n8n · Workflow · Supplier bill intakeLive
Email triggeraccounts inboxSave PDFDrive, fixed nameExtract fieldssupplier, number, totalDuplicate testXero + queueRules lookuplimit, account codeQueue rowAirtable

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-level build6 modules
  1. Module ACapture

    Shared inbox trigger, PDF saved to Drive with a fixed name: supplier, number, date.

  2. Module BExtraction

    Supplier, invoice number, date, due date, subtotal, tax and total read from the PDF; low-confidence fields flagged for a person.

  3. Module CChecks

    Duplicate test on supplier plus number plus total across Xero bills and the queue; bank details compared with the stored account.

  4. Module DSupplier rules

    Default account code, tracking, approver and value limit per supplier, kept in Airtable.

  5. Module EApproval routing

    One approver under the limit, two above it; Slack buttons; reject keeps a reason; reminders after 48 hours.

  6. 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.

Field mapping
From the PDFQueue fieldXero billRule
Supplier name and numberSupplier (linked)ContactMatched to the supplier list, never created silently
Invoice numberBill numberReferencePart of the duplicate key
Invoice and due dateDatesDate, due dateDue date from terms if missing
Line totals and taxAmountsLine itemsDefault account code from supplier rules
Bank detailsBank checkNoneMust match the stored account or the bill is held
PDFDrive linkAttachmentAttached on posting
Approval rules
ConditionRouteResult
Known supplier, under US$500Accounts check onlyPosted as draft
US$500 to US$5,000Budget ownerPosted after approval
Over US$5,000Budget owner, then financePosted after both
New supplier or bank changeFinance review firstHeld until reviewed
Duplicate key foundAccountsHeld with a link to the match

Worked figures

Walkthrough arithmetic for a month of 300 bills through the queue.

A month of bills, worked throughWalkthrough figures
Bills captured300one row each
Duplicates held93.0%
Bank changes held2finance review
Under limit, auto118accounts check only
Two approvals21over US$5,000
Median time to approve1.2 daysfrom capture

Capture to ledger

Captured300
Checks passed289
Approved280
Posted to Xero280

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

AreaIncluded
ReviewThree months of inbox, Xero bills and suppliers, with findings
CaptureInbox trigger, Drive storage, field extraction
ChecksDuplicate key and bank detail check
ApprovalAirtable queue, Slack approvals, value limits, reminders
PostingXero drafts with PDF and approval history
Parallel runTwo weeks of queue alongside the current process
Not includedPaying bills, bank file uploads, purchase order systems, or n8n hosting and plan costs

Milestones, week by week

  1. Week 1

    Review and rules

    • Three-month review
    • Supplier rules table
    • Approval limits agreed
    20% of the fee
  2. Week 2

    Capture and checks

    • Inbox and Drive
    • Extraction
    • Duplicate and bank checks
    25% of the fee
  3. Week 3

    Approval

    • Airtable queue
    • Slack buttons
    • Reminders
    25% of the fee
  4. Week 4

    Parallel run

    • Queue beside the old process
    • Differences reviewed
    20% of the fee
  5. Week 5

    Posting and handover

    • Xero posting on
    • SOP and walkthrough
    • 14 days of fixes
    10% of the fee

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.

Related work snippets

Next step

Bring me the work that repeats.

I scope it in writing, test it against your current process on your own data and hand over everything I build.

Book a consultation