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
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.
How do you connect Xero to n8n?
- 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 containn8n, so call it after your company instead. - 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.
- 03
Grant the scopes and pick the organization
Scopes decide what the connection is allowed to touch. Add
accounting.contactsandaccounting.transactionsto 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.
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.
Operations index
Contact
4 operationsCreate a contact
contact.createWhat 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.
Get a contact
contact.getWhat 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 }}.
Get many contacts
contact.getAllWhat 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
ARCHIVEDappear alongside active ones. - Where and Order By: a filter expression and a sort element, useful when you only want recently modified records.
Update a contact
contact.updateWhat 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
GDPRREQUESTmarks a contact subject to an erasure request.
Invoice
4 operationsCreate an invoice
invoice.createWhat you see in n8n
Notes & use cases
Raises a new invoice and returns it with its Xero identifier and number.
Key parameters
- Type:
ACCRECfor a sales invoice you send out,ACCPAYfor 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:
DRAFTkeeps it out of the ledger,AUTHORISEDcommits it.
Get an invoice
invoice.getWhat 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.
Get many invoices
invoice.getAllWhat 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,SUBMITTEDandAUTHORISED. - Created By My App: narrows results to the invoices your own connection created.
Update an invoice
invoice.updateWhat 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.
AUTHORISED once a manager has signed off.Need help automating Xero with n8n?
A person reads every message.