Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To check a supplier statement against Xero, resolve the supplier to its Xero ContactID, retrieve that contact’s purchase bills, and compare statement rows using explicit rules for references, dates, currencies, and amounts. Use n8n to orchestrate the data flow and a deterministic comparison step to produce an exception report for human review. Xero and n8n do not document a built-in supplier-statement reconciliation action, so this workflow must be assembled from their available API and node operations.

What this workflow checks—and what it does not

A supplier statement is an external record of the supplier’s view of activity on your account. It may arrive as structured rows or as a PDF or image that must first be extracted. The comparison described here checks those statement entries against purchase bills in Xero; it does not assume that a statement’s balance should equal the original total of every bill.

Do not use Xero’s Bank Feeds Statements endpoint to retrieve supplier statements. That endpoint is for financial institutions delivering bank-statement data into Xero, a different purpose from accounts-payable supplier reconciliation (Xero Bank Feeds API Statements).

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The n8n Xero node documentation lists contact and invoice operations, including create, get, get-all, and update actions, but no dedicated statement-reconciliation action. The workflow must retrieve the relevant records and perform the comparison itself.

How to build the comparison workflow

1. Prepare statement rows

Define the input format your implementation will actually accept, such as structured rows containing supplier reference, invoice date, currency, and amount. If the statement is a PDF or image, treat extraction as a separate stage and validate the extracted values before matching. No particular OCR tool or extraction accuracy is established here.

Keep each original value alongside its normalized counterpart. This lets a reviewer see both the source text and the value used in a comparison.

2. Resolve the supplier to ContactID

Find the supplier contact in Xero and carry its ContactID through the workflow as the canonical identity. Xero says ContactID is unique within an organisation and recommends it over ContactName, which may no longer be unique. See Xero’s Accounting API Contacts documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not match bills across contacts merely because their names look similar. If supplier identity cannot be resolved confidently, stop that statement batch or row for review rather than proceeding with a name-only guess.

3. Retrieve purchase bills

Xero’s Invoices resource covers both sales invoices and purchase bills. For accounts-payable checking, retrieve purchase bills for the selected ContactID and the period relevant to the statement—not sales invoices or bills belonging to another contact. The Xero Accounting API Invoices documentation describes the resource and its operations.

Use the n8n Xero node’s invoice operations where they expose the parameters you need. If a required API parameter or operation is not available through the node, n8n’s integration documentation points to using an HTTP Request node for custom API calls. Confirm the current endpoint, authentication, and node-version details in the applicable n8n and Xero documentation. For a checking workflow, use read-only access unless writing records is an explicit, separately controlled requirement.

4. Normalize fields with declared rules

Deterministic matching means that the same inputs and rules produce the same result. It does not guarantee that source extraction is correct or that every difference is an accounting error. Make each normalization policy visible and preserve the pre-normalized values.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Supplier: use ContactID as the supplier key.
  • Invoice reference: trim surrounding whitespace and adopt one explicit case policy, such as case-insensitive comparison. Keep the original reference for the exception report.
  • Dates: parse using the input’s declared date format or locale, then compare the same date field consistently—invoice date with invoice date, for example, rather than switching between invoice and due dates.
  • Currency and amount: compare currency as well as amount. Do not compare amounts in different currencies unless the workflow applies a documented conversion rule.
  • Multiple candidates: if more than one bill meets the matching rules, report an ambiguous match. Do not silently pick the first result.

These are implementation policies, not automatic behaviors guaranteed by Xero or n8n. Document the choices in the workflow and its report.

5. Assign an explainable result

Apply the rules to each statement row and emit a status with the fields that led to it. A useful exception report includes the original statement values, normalized values, matched Xero bill ID and reference when available, compared fields, the rule that failed, and a review status.

  • Matched: one purchase bill meets the stated identity and comparison rules.
  • Statement item missing from Xero: no eligible bill was found for the statement entry.
  • Xero bill missing from statement: an in-scope purchase bill has no corresponding statement entry.
  • Amount difference: a candidate bill is identified, but the compared amount differs.
  • Possible duplicate or ambiguous: multiple candidates satisfy the rules, or duplicate references need investigation.
  • Partial payment or balance mismatch: the statement balance differs from the bill total or expected open amount.
  • Needs review: input quality, identity, date interpretation, currency, or another condition prevents a reliable automatic decision.

A supplier statement can reflect payments, credits, timing, or currency effects, so an apparent balance mismatch is not by itself proof that a bill is wrong. Check the relevant Xero records and your organisation’s accounting treatment; tenant-specific cases are not settled by the API documentation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Where TypeScript fits in n8n

n8n’s Code node documentation specifies JavaScript or Python execution; it does not document native TypeScript execution. A TypeScript comparison module therefore needs a documented build or deployment arrangement that produces JavaScript for the execution environment, rather than assuming TypeScript can be pasted into the Code node unchanged. The TypeScript documentation covers the language and compiler.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The n8n Code node documentation also says the node cannot access the filesystem or make HTTP requests. Use dedicated workflow nodes for file handling and network requests. External npm modules can be imported in self-hosted n8n when configured; n8n Cloud does not allow arbitrary external npm imports and instead provides specific modules. Check the current deployment documentation before relying on a dependency.

Controls that keep exceptions useful

  • Separate extraction, supplier resolution, bill retrieval, normalization, matching, and reporting so a failure can be identified at the right stage.
  • Keep the workflow read-only unless record creation or updates are a defined requirement with appropriate approval.
  • Record the rule and values behind each match so a reviewer can reproduce the decision.
  • Route uncertain supplier identity, duplicate candidates, and unexplained balance differences to a person instead of forcing an automatic match.
  • Set access and data-handling controls appropriate to the statement and accounting records being processed.

This design is a proposed workflow, not a tested n8n deployment or a guarantee of a particular match rate. The appropriate balance of automation and review depends on statement format, transaction volume, and the controls required by your finance process.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.