Resources · n8n integration

Xero n8n integrationAutomate Xero with n8n.

Accounting data is the last thing anyone wants to retype. The Xero n8n integration covers 8 operations across 2 resources, contacts and invoices, behind a single OAuth2 credential. There is no Xero trigger node, so a Schedule or a Webhook starts the workflow instead.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the Xero n8n integration give you?

The Xero n8n integration is a node shipped with n8n that talks to the Xero Accounting API on your behalf. It exposes 8 operations spread over 2 resources: Contact and Invoice. You can create a contact, fetch one, list many, update one, and do the same four things with invoices. Every operation runs against one Xero organization that you pick in the node, so a workflow never writes to the wrong set of books.

Start with the obvious job: turning orders into paperwork. A payment lands in your billing tool, the workflow reads the buyer, then invoice.create writes a sales invoice with Type set to ACCREC. Teams running checkout through Stripe usually chain the two nodes directly, with Status left on DRAFT until an accountant has looked at the batch.

The second job is reporting without the export button. invoice.getAll with Return All switched on walks through every page the API returns, so a nightly run can push the full ledger into Google Sheets and post a short summary to Slack. Filter it down first with Statuses if only authorised invoices matter, or with Where when you need a condition the node has no field for.

The third one is keeping the contact file honest. contact.getAll lists what Xero holds, Include Archived decides whether retired contacts come back too, and contact.update writes corrections back: a fixed Email, a missing Tax Number, a Contact Status moved to ARCHIVED. One published n8n template does something close to this for supplier bills, reading attachments from a mailbox and matching them against Xero before anyone approves a payment.

Know where the node stops. It handles contacts and invoices, nothing else, so payments, credit notes, bank transactions and reports have no operation here. The HTTP Request node covers them: it calls any Xero API endpoint and reuses the same credential through predefined authentication, which means no second app to register. There is also no Xero trigger node, so anything time based runs on a Schedule Trigger and anything event based needs a Webhook node that another service calls.

If you are weighing this against another ledger before you commit, the Quickbooks node covers similar ground with a different set of resources. And if the whole n8n side is new to you, the n8n training walks through credentials, expressions and error handling before you point a workflow at live books.

Connect

How do you connect Xero to n8n?

  1. 01

    Register a custom connection app in Xero

    Head to the app manager in the Xero developer portal and create an OAuth2 custom connection. Pick Web app as the Integration Type, then put your n8n address in Company or Application URL: the URL of your n8n server or its reverse proxy, which on the hosted offer looks like https://your-username.app.n8n.cloud/. One catch to note early, Xero rejects app names that contain n8n, so call it after your company instead.

  2. 02

    Match the redirect URL on both sides

    In n8n, open Credentials and start a new Xero credential. It shows an OAuth Redirect URL. Copy that value into your Xero app as an OAuth 2.0 redirect URI, save the app, then bring the Client ID and Client Secret it generated back into the n8n credential. A credential is created once and reused by every workflow, so this round trip happens a single time.

  3. 03

    Grant the scopes and pick the organization

    Scopes decide what the connection is allowed to touch. Add accounting.contacts and accounting.transactions to the app to cover everything the node does, then finish the OAuth2 handshake from n8n. Back in the node, the Organization Name or ID dropdown lists the Xero organizations the connection reaches, and it is required on all 8 operations.

Actions

What the Xero node can do

The Xero node exposes 8 operations across 2 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.

Resources × operations matrix
ResourceCreateGetGet ManyUpdate
Contact✓✓✓✓
Invoice✓✓✓✓

Contact

4 operations
01

Create a contact

contact.create

What you see in n8n

Notes & use cases

Adds a customer or supplier record to Xero and returns it with the contact ID that later operations need.

Key parameters

  • Organization Name or ID: the Xero organization the contact is written to, chosen from the list or set with an expression such as {{ $json.orgId }}.
  • Name: the full name of the person or company, and the only descriptive field Xero insists on.
  • Additional Fields: where Email, Tax Number and Default Currency live, among 15 optional fields.
Use cases
a signup form creates the client record before the first invoice is ever raised.
02

Get a contact

contact.get

What you see in n8n

Notes & use cases

Reads one contact and hands back the full record, addresses and account defaults included.

Key parameters

  • Organization Name or ID: the set of books to read from, required here as everywhere else.
  • Contact ID: the Xero identifier of the record, not the display name. It usually arrives from a previous node as {{ $json.ContactID }}.
Use cases
before sending a payment reminder, pull the contact to confirm the billing email is still the right one.
03

Get many contacts

contact.getAll

What you see in n8n

Notes & use cases

Lists contacts from the organization, one n8n item per contact.

Key parameters

  • Return All: on, n8n pages through every contact in the file; off, Limit caps how many come back.
  • Include Archived: decides whether contacts sitting in ARCHIVED appear alongside active ones.
  • Where and Order By: a filter expression and a sort element, useful when you only want recently modified records.
Use cases
a monthly audit that flags every customer missing a tax number.
04

Update a contact

contact.update

What you see in n8n

Notes & use cases

Edits an existing contact. Only the fields you fill in are sent, so the rest of the record stays untouched.

Key parameters

  • Contact ID: identifies the record to change, and nothing happens without it.
  • Update Fields: 16 optional fields, including Name, Bank Account Details, Account Number and Contact Status.
  • Contact Status: setting it to GDPRREQUEST marks a contact subject to an erasure request.
Use cases
a CRM change of address flows straight into the accounting file.

Invoice

4 operations
05

Create an invoice

invoice.create

What you see in n8n

Notes & use cases

Raises a new invoice and returns it with its Xero identifier and number.

Key parameters

  • Type: ACCREC for a sales invoice you send out, ACCPAY for a supplier bill you receive. There is no default, the choice is required.
  • Contact ID: who the invoice belongs to, typically the ID returned by an earlier contact operation.
  • Line Items: each line carries a Description, a Quantity and a Unit Amount.
  • Status: DRAFT keeps it out of the ledger, AUTHORISED commits it.
Use cases
monthly retainers raised in one run from a subscription list.
06

Get an invoice

invoice.get

What you see in n8n

Notes & use cases

Fetches a single invoice with its lines, totals and current status.

Key parameters

  • Organization Name or ID: the organization holding the invoice, picked from the dropdown or built from data with an expression.
  • Invoice ID: the Xero identifier, which is not the human readable invoice number shown on the document.
Use cases
a support workflow that answers "is this one paid?" by reading the live record instead of a copy stored elsewhere.
07

Get many invoices

invoice.getAll

What you see in n8n

Notes & use cases

Returns a batch of invoices, ready to be filtered, totalled or exported downstream.

Key parameters

  • Return All: off by default, and then Limit sets the ceiling. On, n8n keeps requesting pages until the ledger is exhausted.
  • Statuses: a multi select across DRAFT, SUBMITTED and AUTHORISED.
  • Created By My App: narrows results to the invoices your own connection created.
Use cases
a weekly aged receivables sheet built from authorised invoices only.
08

Update an invoice

invoice.update

What you see in n8n

Notes & use cases

Changes an invoice already in Xero, including its status.

Key parameters

  • Invoice ID: the record to modify, required.
  • Update Fields: 15 optional fields such as Due Date, Reference, Line Items and Currency Rate.
  • Send To Contact: marks the invoice as sent in the Xero app, and it only works on invoices that have been approved.
Use cases
promoting a batch of drafts to AUTHORISED once a manager has signed off.
Need help

Need help automating Xero with n8n?

A person reads every message.

FAQ

Xero and n8n, the questions that come up next

01Is the Xero n8n integration free to use?
Yes on the n8n side. The Xero node ships with n8n, so there is nothing to install and no add-on to buy, and it behaves the same whether you run n8n Cloud or self-host with Docker or npm under the Community Edition and its Sustainable Use licence. What you pay for your Xero subscription is a separate matter and depends on your plan with them. The only real cost of the integration is the setup time: one custom connection app in the Xero developer portal, one credential in n8n, and every workflow after that reuses it.
02What credentials do you need to connect Xero to n8n?
OAuth2, and that is the only method the credential supports. You create a custom connection app in the Xero developer portal, which gives you a Client ID and a Client Secret to paste into n8n. The app has to be registered as a Web app, its Company or Application URL points at your n8n server, and the OAuth Redirect URL shown by n8n has to be listed as a redirect URI on the Xero side. Add the accounting.contacts and accounting.transactions scopes to reach everything the node does. One detail catches people out: Xero will not accept an app name containing n8n.
03What are the limits of the Xero node in n8n?
It covers 2 resources and 8 operations, nothing more. Contacts and invoices can be created, read, listed and updated, but there is no delete, and payments, credit notes, bank transactions and reports have no operation at all. For those, the HTTP Request node calls any Xero API endpoint and reuses the same credential through predefined authentication, so you keep one connection. Listing is the other thing to watch: with Return All off, only up to Limit results come back, which quietly truncates an export you thought was complete.
04Does the Xero node react in real time?
No, because there is no Xero trigger node in n8n. Nothing on the Xero side will wake a workflow up on its own, so you choose the starting point yourself. A Schedule Trigger runs the workflow at a fixed interval and reads what changed, which fits nightly exports and reconciliation runs. A Webhook node gives n8n a URL that another service can call the moment something happens in that service, which is how an order tool or a form can push work towards Xero. The trigger of another tool works just as well as the entry point.
05n8n or Make for Xero?
It depends on where you want the workflow to live and how you want to pay for it. Make is hosted only and billed per operation, so a job that loops over a long invoice list costs more as the ledger grows. n8n runs on Cloud too, but it can also be self-hosted, which keeps accounting data on infrastructure you control and takes the per operation counter out of the equation. Both give you a visual canvas. The honest split is that Make is quicker to start on, while n8n pays off once volume, data control or custom API calls enter the picture.