11 overdue invoices worth $27,450
Which customers should get a reminder today?
$27,450 is overdue across 7 customers. Fabrikam's two invoices are 74 days late and nobody has chased them since September 12.
Every weekday: unpaid Xero invoices past their due date, grouped by customer and days late, and a question on which to chase today.
Reads
You get
The card on the right is a sample. Yours shows your own numbers and updates in place every run.
What lands on your board
Which customers should get a reminder today?
$27,450 is overdue across 7 customers. Fabrikam's two invoices are 74 days late and nobody has chased them since September 12.
Chasing money is easy to put off because the list is never in front of you. Xero knows exactly which invoices are late, but it waits for someone to open Business > Invoices, sort by due date and decide who gets an email.
Each weekday the agent builds that list: overdue sales invoices grouped by customer, how late each one is, and when anyone last sent or noted it. You answer one question on the card, and it drafts the reminders for the customers you pick, with the link to the online invoice, and logs the chase on each invoice.
Call GET /api.xro/2.0/Invoices?Statuses=AUTHORISED&where=Type=="ACCREC" AND DueDate<DateTime(2026,10,17) (today's date) with page and pageSize=100. Keep InvoiceNumber, Contact.Name, DueDate, Total, AmountDue and CurrencyCode; an AmountDue below Total means a part payment.
Work out days late from DueDate, total AmountDue per customer, and put each customer in a bucket by its oldest invoice: 1 to 15, 16 to 30, 31 to 60 and over 60 days.
Read GET /api.xro/2.0/Invoices/{InvoiceID}/History and take the latest entry that records the invoice being sent or a reminder note, so the list shows who has not heard from you in weeks.
Post the list and ask which customers to chase. For each one picked, draft a short reminder that lists the invoices and includes the link from GET /Invoices/{InvoiceID}/OnlineInvoice, and add a note with PUT /Invoices/{InvoiceID}/History. Resend through POST /Invoices/{InvoiceID}/Email only if you ask for it.
With BRIEFKIN_TOKEN set, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.
Pick your agent, where the data comes from and how to schedule it; the commands below follow.
One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.
shellcurl -fsSL https://briefkin.dev/skills/xero-overdue-invoices-to-chase/install | shAsk Claude Code:
promptRun the xero-overdue-invoices-to-chase skillOr paste the prompt instead of installing:
promptUsing the Xero Accounting API, list sales invoices (Type ACCREC) with status AUTHORISED and a DueDate before today. Group them by customer with the number of invoices, total AmountDue, days late of the oldest, and the date of the latest send or note in each invoice's history. Show the totals in age buckets (1-15, 16-30, 31-60, over 60 days). Then ask me which customers to chase today. For the ones I pick, draft a short, polite reminder with the online invoice links. Send nothing and change nothing until I say so.Weekdays at 9:00, from cron on any machine where Claude Code is signed in:
crontab0 9 * * 1-5 claude -p "Run the xero-overdue-invoices-to-chase skill"Add it with crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.
Connect Briefkin once with curl -fsSL https://briefkin.dev/install | sh and every run lands on your board as a question for you. How setup works
SKILL.md---
name: xero-overdue-invoices-to-chase
description: "Every weekday: unpaid Xero invoices past their due date, grouped by customer and days late, and a question on which to chase today. Use when the user asks for this, or when it runs on a schedule."
---
# Xero overdue invoices to chase
Every weekday: unpaid Xero invoices past their due date, grouped by customer and days late, and a question on which to chase today.
Chasing money is easy to put off because the list is never in front of you. Xero knows exactly which invoices are late, but it waits for someone to open Business > Invoices, sort by due date and decide who gets an email.
Each weekday the agent builds that list: overdue sales invoices grouped by customer, how late each one is, and when anyone last sent or noted it. You answer one question on the card, and it drafts the reminders for the customers you pick, with the link to the online invoice, and logs the chase on each invoice.
## Two ways to get the data
Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.
## Route A: API or MCP server
### What you need
- Xero access with `accounting.invoices.read` and `accounting.contacts.read`, plus `accounting.invoices` if the agent should write history notes or resend invoices.
- The official Xero MCP server (its `list-invoices` and `list-aged-receivables-by-contact` tools) or a custom connection; the history and online invoice calls go through the Accounting API.
If something is missing, say what and stop; do not invent numbers.
### Steps
1. **List overdue sales invoices** (Xero): Call `GET /api.xro/2.0/Invoices?Statuses=AUTHORISED&where=Type=="ACCREC" AND DueDate<DateTime(2026,10,17)` (today's date) with `page` and `pageSize=100`. Keep `InvoiceNumber`, `Contact.Name`, `DueDate`, `Total`, `AmountDue` and `CurrencyCode`; an `AmountDue` below `Total` means a part payment.
2. **Group by customer and age**: Work out days late from `DueDate`, total `AmountDue` per customer, and put each customer in a bucket by its oldest invoice: 1 to 15, 16 to 30, 31 to 60 and over 60 days.
3. **Check when each was last chased** (Xero): Read `GET /api.xro/2.0/Invoices/{InvoiceID}/History` and take the latest entry that records the invoice being sent or a reminder note, so the list shows who has not heard from you in weeks.
4. **Ask, then draft** (Xero): Post the list and ask which customers to chase. For each one picked, draft a short reminder that lists the invoices and includes the link from `GET /Invoices/{InvoiceID}/OnlineInvoice`, and add a note with `PUT /Invoices/{InvoiceID}/History`. Resend through `POST /Invoices/{InvoiceID}/Email` only if you ask for it.
## Route B: the browser
### What you need
- Signed in to Xero with the Adviser, Standard or Invoice Only (Sales) role on the organisation; sending reminders needs a role that can approve and send invoices.
If something is missing, say what and stop; do not invent numbers.
### Steps
Start at https://go.xero.com/. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.
1. **Open the overdue invoices**: Start at the Xero dashboard (invoice URLs carry the organisation code), pick the organisation in the top left, then go to **Business > Invoices** and open the **Awaiting payment** tab. Sort by **Due date** oldest first; the overdue ones show a red "Overdue" label with the days late.
2. **Group by customer and age**: For each overdue invoice note the customer, invoice number, due date and the amount due (an amount due below the total is a part payment). Total per customer and put each one in a bucket by its oldest invoice: 1 to 15, 16 to 30, 31 to 60 and over 60 days. For a long list, **Accounting > Reports > Aged Receivables Detail**, as at today and aged by due date, gives the same buckets in one table.
3. **Check when each was last chased**: Open each overdue invoice and scroll to **History & Notes** at the bottom. The latest "Invoice sent" entry or reminder note is the last chase; "Never" when there is none since it was issued.
4. **Ask, then draft**: Post the list and ask which customers to chase. For each one picked, draft a short reminder listing their invoices and the online invoice link (**Get link** on the invoice). Only use **Send reminder** or add a note under History & Notes when the person says so.
Note: The Awaiting payment tab shows 50 invoices a page; above a few dozen overdue invoices the Aged Receivables Detail report is the faster read, and its **Export** gives a spreadsheet. Checking History & Notes means opening each invoice, which is the slow part of this route.
## The report
- **Overdue total** and the number of invoices and customers.
- **By customer**: invoices, amount overdue, days late of the oldest, and when last chased.
- **Age buckets**: 1 to 15, 16 to 30, 31 to 60 and over 60 days.
- The ask: which customers to chase today, then a draft reminder for each one you pick.
## Post it to Briefkin
When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.
```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
-H "authorization: Bearer $BRIEFKIN_TOKEN" \
-H "content-type: application/json" \
-d @- <<'JSON'
{
"v": 1,
"event_id": "xero-overdue-invoices-to-chase/<date of this run, e.g. 2026-10-16>",
"item_key": "xero-overdue-invoices-to-chase",
"project": "Acme",
"source": "Xero overdue invoices to chase skill",
"kind": "action",
"title": "11 overdue invoices worth $27,450",
"summary": "**$27,450** is overdue across **7 customers**. Fabrikam's two invoices are 74 days late and nobody has chased them since September 12.",
"action": {
"request": "Which customers should get a reminder today?",
"options": [
"Everyone over 30 days",
"All 7 customers",
"Fabrikam only",
"Not today"
]
},
"widget": [
{
"type": "Badges",
"props": {
"items": [
{
"label": "Over 60 days: $9,800",
"tone": "bad"
},
{
"label": "31 to 60: $6,200",
"tone": "warn"
},
{
"label": "16 to 30: $7,250"
},
{
"label": "1 to 15: $4,200"
}
]
}
},
{
"type": "Table",
"props": {
"columns": [
"Customer",
"Invoices",
"Overdue",
"Oldest",
"Last chased"
],
"align": [
"left",
"right",
"right",
"right",
"left"
],
"rows": [
[
"Fabrikam",
2,
"$9,800",
"74 days",
"Sep 12"
],
[
"Northwind Traders",
1,
"$6,200",
"38 days",
"Oct 2"
],
[
"Contoso Ltd",
3,
"$4,350",
"21 days",
"Oct 9"
],
[
"Tailspin Toys",
1,
"$2,900",
"16 days",
"Never"
],
[
"Wingtip",
2,
"$2,150",
"9 days",
"Never"
],
[
"Coho Winery",
1,
"$1,250",
"5 days",
"Never"
],
[
"Adatum",
1,
"$800",
"3 days",
"Never"
]
]
}
}
]
}
JSON
```
Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.
## Run it on a schedule
Suggested: Weekdays at 9:00 (`0 9 * * 1-5`). From cron, with the agent signed in on that machine:
```bash
0 9 * * 1-5 claude -p "Run the xero-overdue-invoices-to-chase skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```
Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/xero-overdue-invoices-to-chase#schedule
Source: https://briefkin.dev/skills/xero-overdue-invoices-to-chase
Xero access with accounting.invoices.read and accounting.contacts.read, plus accounting.invoices if the agent should write history notes or resend invoices.
The official Xero MCP server (its list-invoices and list-aged-receivables-by-contact tools) or a custom connection; the history and online invoice calls go through the Accounting API.
https://mcp.xero.com/mcp, in Claude's connector directory. It connects with read-only access and has tools for profit and loss, financial and cash position, aged receivables and payables, invoices, bills, contacts and bank transactions. Connectors added in claude.ai also appear in Claude Code when you sign in with that account.@xeroapi/xero-mcp-server, runs with a custom connection's client ID and secret or with a bearer token: claude mcp add --env XERO_CLIENT_ID=<id> --env XERO_CLIENT_SECRET=<secret> --transport stdio xero -- npx -y @xeroapi/xero-mcp-server@latest, and the same command and variables in Codex or Cursor. It also has tools that create invoices, payments and journals, so set XERO_SCOPES to read scopes only (source).XERO_CLIENT_ID and XERO_CLIENT_SECRET and request granular read scopes such as accounting.invoices.read, accounting.banktransactions.read, accounting.reports.profitandloss.read, accounting.reports.aged.read and accounting.contacts.read; custom connections created since April 29, 2026 use these granular scopes.The Claude connector is read-only already. On the API, request only .read scopes: a token without write scopes can't raise an invoice or record a payment.
No. It drafts reminders and waits. It only calls Xero's Email endpoint, which resends the invoice with your default template, when you choose that, and it always logs a note in the invoice history so the next run knows the customer was chased.
If you have automatic reminders switched on in Xero, they keep running. This list catches what they miss: customers you would rather call, invoices with a part payment, and the ones so late that a template email no longer fits.
No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a asks you, so you can glance at it instead of asking again.
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.
Yes. Switch the data source to "Your browser" and the steps change to the Xero pages themselves: the agent opens go.xero.com in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.
Skills are free to use with any agent. Briefkin is where their results land: one board for every report, number and question your agents send, with a ping when something needs you.
Free during the open beta. No card.