CaptainYi logoCaptainYi

1 November 2026

How to automate Xero aged receivables

A practical way to pull aged receivables from Xero, bucket what is overdue, and deliver a daily exception list without rebuilding the accounts team.

Why the aged receivables report goes stale

Most small operators already have an aged receivables report in Xero. The report is not the problem. The problem is that someone has to open it, decide who to call, and remember what was promised last week. When that person is also buying stock, rostering a kitchen, or packing orders, the report gets exported on Monday and ignored by Thursday.

Automation is useful when it removes the export-and-format step and puts a short exception list in front of the person who actually chases money. It is not useful when it sends a robotic email to every customer the moment an invoice ticks one day over. Collection is still a relationship. The machine should sort. A person should decide the tone.

The tracker described on this site follows that split. It reads aged receivables from Xero, buckets invoices, builds a workbook, and delivers the file to a team chat on a schedule. The public repository is ian60012/xeroinvoicetracker. The notes below are the operating pattern behind that kind of tool, so you can copy the routine even before you copy the code.

What to pull, and what to ignore

For each open invoice you need the contact, the invoice number, the issue date, the due date, the amount due, and the status. You do not need every line item. Line items matter for disputes, and disputes should stay in Xero, not in a second database that drifts.

Authorise the connection with the smallest Xero scope that can read invoices and contacts. Store the token on the server that runs the job, not in a spreadsheet. If a bookkeeper and an operator both need the result, they should receive the report, not share a password.

Decide the organisation and the currency up front. A tracking category or a branded contact group can limit the report to one business unit. Pulling every contact in a multi-entity file and then filtering by eye is how the Monday export gets abandoned.

Bucket, then rank

Xero’s own aged receivables view already groups balances. A daily chase list works better with explicit buckets the team can say out loud: current, under one month past due, one month, two months, and three months or more. The tracker uses that vocabulary so the workbook matches the way a kitchen or a wholesaler already talks about debtors.

Inside each bucket, sort by amount due and then by days overdue. A small invoice that is four months late and a large invoice that is a week late are different phone calls. The report should show both, and it should not hide the small one, because a pattern of small late invoices is often the early signal.

A third sheet by customer, with a simple on-time history, stops the team arguing from memory. “They always pay late” is either visible in prior due dates or it is not. Keep the history descriptive. Do not invent a credit score.

  • Summary: totals by bucket, so the owner sees the shape of the book.
  • Invoices: one row per open document, with due date and amount still owing.
  • By customer: open balance and a plain reading of recent payment timing.

Deliver it where the chase already happens

A report that lands in an inbox nobody watches is the same as no report. Put the file where the Monday meeting already is. In the tracker that place is a Lark bot on a cron, because that was the chat the team used. Your version might be email to a single shared address, a Teams channel, or a folder the bookkeeper opens. The transport matters less than the fact that it arrives without someone remembering to export.

Run it on business mornings, after Xero has the previous day’s receipts. Running it hourly creates noise. Running it monthly recreates the stale report you already have. Daily on weekdays is usually enough for a small debtor book.

Write down the exceptions the tool must not auto-send: invoices in dispute, payment plans, and customers the owner wants to call personally. Those rows can stay on the sheet and be marked, rather than deleted, so the total still reconciles to Xero.

What you still do by hand

The tool does not know that a customer’s buyer is on leave, that a credit note is about to be raised, or that a chef-director relationship is worth more than one invoice. Leave those calls with a person. The win is that the person starts from a list that matches Xero this morning, not from a workbook saved under three different names.

If you want this wired to your own Xero file and your own chat, the Xero tracker page shows the moving parts, and the contact form is the right place to describe how you chase today. Bring the bucket names your team already uses. The report should learn their language, not the other way around.