---
name: xero-weekly-cash-flow-report
description: "Every Monday: each Xero bank account's balance, the cash that came in and went out last week, and the five biggest movements. Use when the user asks for this, or when it runs on a schedule."
---

# Xero weekly cash flow report

Every Monday: each Xero bank account's balance, the cash that came in and went out last week, and the five biggest movements.

Founders want to know one thing on Monday: did we end the week with more cash or less, and why. In Xero that means the Bank Summary report for the right dates, then a dig through account transactions to see which payments moved the number.

The agent runs both: balances and cash in and out per account from the Bank Summary, then the largest receipts and payments of the week. Finance leads get a table they can paste into the weekly update, and the founder gets the reason in one line.

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

- A Xero connection with `accounting.reports.banksummary.read`, `accounting.banktransactions.read` and `accounting.payments.read`. Apps created since 2 March 2026 use these granular scopes; older apps can keep `accounting.reports.read` and `accounting.transactions.read` until September 2027.
- The official Xero MCP server covers bank transactions and payments; the Bank Summary is a direct Accounting API call with the same connection.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Run the Bank Summary** (Xero): Call `GET https://api.xero.com/api.xro/2.0/Reports/BankSummary?fromDate=<last Monday>&toDate=<last Sunday>` with the `xero-tenant-id` header. Each bank account row carries the opening balance, cash received, cash spent and closing balance.
2. **Find the biggest movements** (Xero): Call `GET /api.xro/2.0/BankTransactions` with `where=Date>=DateTime(2026,10,05) AND Date<=DateTime(2026,10,11)` (last week's dates) for spend and receive money, and `GET /api.xro/2.0/Payments` with the same filter for invoice and bill payments, which are not bank transactions. Keep contact, reference, account and amount.
3. **Add the four-week view**: Keep each week's totals in a JSON file (or run the Bank Summary for the three weeks before on the first run) and work out the average weekly net cash flow, so one heavy week reads in context.
4. **Write the report**: The table per account, totals for cash in, cash out and net, the five largest movements by absolute amount, and one line naming the movement that explains the week.

## Route B: the browser

### What you need

- Signed in to Xero with the Adviser, Standard or Read Only role on the organisation (the Invoice Only roles cannot open reports), with 2FA done by the person.

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 Bank Summary**: Xero report URLs carry the organisation code, so start at the Xero dashboard, pick the organisation from the menu in the top left, then go to **Accounting > Reports** and open **Bank Summary**. Set the **Date range** to last Monday to last Sunday and click **Update**.
2. **Read the table**: Each bank account row shows **Opening balance**, **Cash received**, **Cash spent** and **Closing balance**, with a total row underneath. Copy all four for every account.
3. **Find the biggest movements**: Go to **Accounting > Bank accounts**, open each account and choose **Account transactions**. Filter to the same week, sort by amount, and note the five largest receipts and payments across accounts with date, contact and reference. Leave out transfers between your own accounts.
4. **Add the four-week context**: Run the Bank Summary again for each of the three weeks before (change the date range and Update) and average the four weeks' net cash flow. Write the per-account table, the totals, the five movements, and one line naming the movement that explains the week.

Note: The Bank Summary shows the whole report on one page, so this route is quick. Account transactions page in batches, so an account with many lines takes several pages or the **Export** on that screen. As with the API, unreconciled statement lines are not in the numbers yet.

## The report

- **Closing balance** across all bank accounts and the change on the week.
- **Per account**: opening balance, cash in, cash out, closing balance.
- **Biggest movements**: the five largest receipts and payments, with contact and date.
- **Four-week average** net cash flow.
- One line on what moved the week, for example "Quarterly insurance of $12,480 fell this week".

## 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-weekly-cash-flow-report/<date of this run, e.g. 2026-10-16>",
  "item_key": "xero-weekly-cash-flow-report",
  "project": "Acme",
  "source": "Xero weekly cash flow report skill",
  "kind": "update",
  "title": "Cash down $18.4k last week across 3 accounts",
  "summary": "Closing balance **$212,640**. **$64,210** came in and **$82,610** went out, led by payroll and the quarterly insurance premium.",
  "widget": [
    {
      "type": "Table",
      "props": {
        "columns": [
          "Account",
          "Opening",
          "In",
          "Out",
          "Closing"
        ],
        "align": [
          "left",
          "right",
          "right",
          "right",
          "right"
        ],
        "rows": [
          [
            "Business checking",
            "$148,320",
            "$61,890",
            "$78,410",
            "$131,800"
          ],
          [
            "Savings",
            "$80,000",
            "$120",
            "$0",
            "$80,120"
          ],
          [
            "PayPal",
            "$2,720",
            "$2,200",
            "$4,200",
            "$720"
          ],
          [
            "Total",
            "$231,040",
            "$64,210",
            "$82,610",
            "$212,640"
          ]
        ]
      }
    },
    {
      "type": "Table",
      "props": {
        "columns": [
          "Date",
          "Contact",
          "Account",
          "Amount"
        ],
        "align": [
          "left",
          "left",
          "left",
          "right"
        ],
        "rows": [
          [
            "Oct 10",
            "Payroll run",
            "Business checking",
            "-$41,300"
          ],
          [
            "Oct 7",
            "Northwind Traders",
            "Business checking",
            "+$18,600"
          ],
          [
            "Oct 8",
            "Insurance (quarterly)",
            "Business checking",
            "-$12,480"
          ],
          [
            "Oct 9",
            "Contoso Ltd",
            "Business checking",
            "+$11,250"
          ],
          [
            "Oct 6",
            "Cloud hosting",
            "PayPal",
            "-$3,940"
          ]
        ]
      }
    },
    {
      "type": "Callout",
      "props": {
        "text": "The four-week average is -$6,200 a week. This week ran deeper because the $12,480 quarterly insurance premium fell in it.",
        "tone": "info"
      }
    }
  ]
}
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: Mondays at 8:00 (`0 8 * * 1`). From cron, with the agent signed in on that machine:

```bash
0 8 * * 1 claude -p "Run the xero-weekly-cash-flow-report 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-weekly-cash-flow-report#schedule

Source: https://briefkin.dev/skills/xero-weekly-cash-flow-report
