The Xero export integration connects a Xero organization to fileAI so you can send extracted financial data straight into Xero. Once connected, you can export purchase invoices and sales invoices to Xero, and download bank statement data as a Xero-compatible CSV for manual import.
You connect Xero in the app. Once it is connected, you can also create Xero export rules, run exports and read each file’s outcome through the API. See Export rules.

What you can export

Exports use the accounts, tax codes and tracking categories you have configured for the integration, so the same mapping is applied every time. The app shows each export’s status and the reason when an export fails.

How it works

Connect your Xero account

fileAI connects through Xero’s own OAuth2 sign-in. You sign in on Xero’s site, and fileAI never sees or stores your Xero password.
1

Open Xero from Export Integrations

In Drive (your file repository), open the integration menu and select Xero under Export Integrations.
Xero in the Export Integrations menu
2

Sign in through Xero

You are redirected to Xero’s sign-in page. Sign in with your Xero account.
Xero sign-in page
3

Choose your organization and allow access

Pick the Xero organization to connect, review the permissions Xero lists, and select Allow access.
Xero consent screen with Allow access
4

Confirm the connection

Back in fileAI, the Xero export icon now appears in the action bar.
Xero connected in the fileAI action bar

Download a bank statement for Xero

1

Open the file

Select the bank statement and open its AI Schema tab to review the extracted data.
2

Download as XERO_CSV

Open the Download dropdown at the upper right and choose XERO_CSV. The file is saved to your downloads folder when the progress bar finishes.
3

Import into Xero

Upload the CSV to Xero manually.
XERO_CSV only works for bank statements. Choosing it for any other kind of file shows an error. Use XLSX, XLS, CSV, JSON or PDF for other files.

Check export status

GET /v1/files/{fileId}/exports returns the outcome of the file’s latest export (EXPORTED, FAILED with the reason, or EXPORTING) and the link to the record in Xero. See Export rules.

Report an export from your own system

If you export files from fileAI to another system yourself, you can record the outcome on the file. It appears in the exportInfo object of the file in GET /v1/files:
Write the outcome with PATCH /v1/files/{fileId}. fileAI stores it in the file’s exportInfo, sets integrationExportUpdatedAt, and adds an entry to the file’s activity in the app.
integrationExportStatus must be one of the four values above. integrationExportMessages is optional, but only accepted together with integrationExportStatus. The same endpoint also sets a file’s tags with tagIds, so a request needs at least one of integrationExportStatus and tagIds (see Set a file’s tags). The response returns the fileId, the new exportInfo and the file’s tags. FILEAI_BASE_URL is https://api.orion.file.ai/prod/v1, or your regional host.

Multi-page financial report

Upload a file, wait for processing and read its values end to end.

AI Schemas

Define the invoice fields you extract before exporting.

Incremental loading

Read files, including exportInfo, into your own systems.

Notifications

Email the right people when a file meets your conditions.