Full disclosure: I'm the developer of BulkOps, a Xero add-on. The manual process below is accurate regardless of whether you use it.
Every so often someone needs all the files attached to their Xero documents for a period: an audit sample, a handover to a new accountant, closing a business, or migrating to another system. Reports and ledgers come out of Xero as CSV in a couple of clicks. The attachments do not, and that catches people out at the worst possible moment.
Here is what actually happens inside Xero, what the API offers, and how to get a whole date range out as one ZIP.
The manual process (one file at a time)
Attachments in Xero live on individual documents. To get them out through the interface:
- Open Business → Invoices (or Bills, or Credit notes) and open a document.
- Click the attachment icon to list its files.
- Open each file and download it.
- Rename the download so you can tell later which document it belonged to.
- Repeat for every document, and every file on it.
For a handful of documents this is fine. For a year of trading with attachments on even a third of your documents, it is hundreds of clicks, and step 4 is where files quietly lose their link to the transaction they support.
What the Files library and exports cover (and don't)
- Xero's Files library only holds files uploaded to the library itself. Attachments added on an invoice or bill are not in it.
- Xero's data exports (CSV, reports, the general ledger) cover transaction data, not the attached documents.
- Continuous backup services mirror your whole organisation on a subscription. They solve insurance, not the "give me this year's source documents as files, today" problem.
So if the files you need are the ones clipped to documents, the interface route is the per-document download above.
What the API offers
Xero's official Attachments API lists and serves the files on invoices, bills, credit notes and other documents, under a read-only permission scope (accounting.attachments.read). Two things to know if you go the script route:
- It is one request per document to list attachments, then one per file to download. A year of documents means thousands of calls.
- Requests count against Xero's daily API limit per organisation, so a large export has to pace itself and resume the next day. That is the part people usually discover after the script has been running for an hour.
Exporting every attachment for a date range as one ZIP
BulkOps (built by me) connects through Xero's official OAuth with the read-only attachment scope and turns the above into one job:
- Pick a date range and document types (invoices, bills, credit notes). It scans for every document that has attachments and shows you the list before anything runs.
- The export runs server-side as a queued job, paced under Xero's API limits. You can close the browser; big exports email you when they finish, and if the daily limit is hit the job pauses and resumes by itself.
- Files keep their link to the source document: each file is grouped under its invoice or bill number, with a manifest, and downloads as one ZIP or individually.
- Nothing in Xero changes. The operation is read-only. Exported copies stay available for 7 days and are then deleted from our servers automatically.
Previews are unlimited and free, and the first 25 exported documents are free with no card: https://bulkops.microspear.app/guides/bulk-export-xero-attachments
FAQ
Can you download all attachments from Xero at once?
In Xero's own interface, attachments are downloaded per document. Bulk export is one of the most-supported requests on Xero's idea board (nearly 700 votes); BulkOps provides it as a read-only export grouped by document.
Does exporting attachments change anything in Xero?
No. Reading and downloading attachments is read-only. Documents, amounts and the files themselves stay exactly as they are.
What do auditors usually ask for?
Typically the source documents (supplier invoices, receipts, credit adjustments) for a date range or a sample of transactions. That means the files attached to specific invoices, bills and credit notes.
One practical tip if you are closing an organisation: do the export before cancelling the subscription. Attachments are only reachable through the interface and the API while the organisation is active.
Top comments (0)