> For the complete documentation index, see [llms.txt](https://integrations.drivetrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.drivetrain.ai/integration-guide/readme/accounting-and-erp/integrating-with-xero.md). Agents can also search and read this documentation through its [MCP server](https://integrations.drivetrain.ai/~gitbook/mcp).

# Integrating with Xero

Connect Xero to Drivetrain quickly—no provisioning or support required.

You connect Xero to Drivetrain yourself by signing in to Xero. No user provisioning is needed, and Drivetrain gets read-only access.

## Before you start

* **In Drivetrain:** you need to be an admin.
* **In Xero:** a user with the **Standard** or **Advisor** role in the organisation you want to connect.
* When you sign in, Xero asks you to allow read-only access to accounting data (accounts, contacts, invoices, payments, bank transactions, journals, manual journals, settings, and profit and loss and balance sheet reports), plus read-only projects and payroll access.

## Step 1: Start the connection in Drivetrain

1. Go to the **Data** page.
2. Click the **+** icon at the top of the **Data** panel (or **Add data source** if nothing is connected yet).
3. Select **Xero**.
4. Click **Login to connect**.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-5c9e2197a080ceee84f744c47f1e73386bc54458%2FXero%20(1).gif?alt=media" alt=""><figcaption></figcaption></figure>

## Step 2: Sign in to Xero

The Xero sign-in page opens in the same tab. Sign in and complete multi-factor authentication if asked.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-3399282fe670ea1dbbd7a26e8c8abab1dbf0cd82%2FXero%20(2).gif?alt=media" alt=""><figcaption></figcaption></figure>

## Step 3: Choose the organisation and allow access

Select **one** organisation and allow access.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-109e8146b358c02b0e4a697f4c7c19d2713f9c77%2FXero%20(4).gif?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Each data source connects one Xero organisation. To connect another organisation, repeat from Step 1. If you select several, Drivetrain connects only the first one that isn't connected yet. You can't connect the same organisation twice.
{% endhint %}

## Step 4: Check that it worked

You return to Drivetrain, the new Xero data source appears on the **Data** page and the first sync starts. When it finishes, the data source shows **Connected**.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-58d6483c7c7bd6e6d30929ed55edf4d74200f12c%2FXero%20(6).gif?alt=media" alt=""><figcaption></figcaption></figure>

## What data comes in

* Drivetrain's standard Xero datasets: **Account**, **General Ledger**, **Trial Balance**, **Trial Balance Report** and **Tracking Categories**.
* They're built from these Xero records: accounts, bank transactions, bank transfers, contacts, credit notes, invoices, journals, manual journals, overpayments, payments, profit and loss and balance sheet reports, and tracking categories.
* Data syncs daily by default. Use **Sync** in the data source's menu to sync now, or **Sync schedule** to change the schedule.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-c2d958bbd04b6d9bfe379a44b74334669ad69938%2FData-flow-diagram-xero-drivetrain-documentation.png?alt=media" alt=""><figcaption></figcaption></figure>

## Reconnect or disconnect

* The Xero sign-in stops working if it's unused for 60 days, or if Drivetrain is disconnected in Xero. Syncs then fail. See [Re-authentication of Xero](https://integrations.drivetrain.ai/integration-guide/readme/accounting-and-erp/integrating-with-xero/re-authentication-of-xero.md).
* To disconnect, open the data source's menu (**⋮**), choose **Remove** and confirm with **Delete data source**. This also deletes the Xero data from Drivetrain. To revoke access on the Xero side too, disconnect Drivetrain under **Connected apps** in your Xero settings.

## Troubleshooting

<details>

<summary>Where can I check the connection status?</summary>

On the **Data** page, each data source in the **Data** panel shows its status. A failing connection shows an error, and a working one shows **Connected**.

![](https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-75b3fd5e7f48fdf1ded1e9b0ddb5f326659ea101%2FXero-sync-failed-status.png?alt=media)

![](https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-3ff8d24e79f75674949cb796e930991f396baeec%2Fxero-connected-status.png?alt=media)

</details>

<details>

<summary>"Already connected in this workspace: …"</summary>

Every organisation you selected already has a Xero data source. To fix that data source, use **Edit credentials** on it. To add a new one, connect again and select an organisation that isn't connected yet.

</details>

<details>

<summary>"Xero returned no organisation for this login …"</summary>

No organisation was selected. Connect again and select one.

</details>

<details>

<summary>"Xero didn't report which organisation was selected …"</summary>

Connect again with a Xero login that can only access the organisation you want, or contact support.

</details>

<details>

<summary>I can't allow access in Xero.</summary>

Your Xero user needs the Standard or Advisor role in that organisation.

</details>

<details>

<summary>Still stuck?</summary>

Contact your Drivetrain onboarding partner with a screenshot or description of the error. In rare cases, such as data inconsistencies, they may ask for [temporary access to Xero](https://integrations.drivetrain.ai/integration-guide/readme/accounting-and-erp/integrating-with-xero/grant-temporary-access-to-xero.md).

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://integrations.drivetrain.ai/integration-guide/readme/accounting-and-erp/integrating-with-xero.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
