---
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
