Skip to content

Weekly

Get a weekly snapshot of who owes whom

Monday's email totals receivables and payables and adds a short written read on how they're moving.

Runs
Weekly
Apps
Xero
AI
Yes, uses the built-in AI allowance
Access
accounting.reports.read, accounting.transactions.read

Send this to your assistant

Create a ClickRuntime automation: every Monday at 7am, email me Xero's total receivables and open bills, with a few sentences on what changed and anything worth chasing.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A small business owner running Xero often has two mental ledgers: who owes me money and whom do I owe. Without a weekly look, a large customer invoice drifts from 30 to 60 days overdue while a supplier bill quietly comes due the same week, and the first sign of a cash squeeze is a bank balance that is lower than expected.

Each week, the aged receivables and open bills are pulled from Xero, totalled, and passed to ClickRuntime's built-in AI, which writes a short plain-language summary of the position. It highlights the largest overdue customers and the bills coming due, and the email lands before you plan the week.

Founders without a finance team and part-time bookkeepers who want a quick brief for clients are the ones who use it most.

What you get out of it

  • Cash pressure is seen in advance

    Putting overdue receivables next to upcoming payables shows whether you can cover next week's bills, so you can chase a customer before you need to borrow. Acting a week sooner can mean the difference between a short chase and a bank overdraft.

  • The biggest debtors lead the summary

    A paragraph naming the largest overdue amounts tells you whom to phone first, which is more useful than scanning a table of forty small invoices. Those names are usually where the real cash is stuck, and a call there pays off most.

  • Totals without opening reports

    Receivables and payables totals appear in the email, so you can check your position from a phone without running two reports in Xero. That is handy when you are away from your desk and want to confirm the position quickly.

  • A better client conversation

    Bookkeepers can forward the snapshot to owners as a weekly brief, which makes check-ins shorter and keeps the owner aware of what the numbers mean. Clients tend to value a plain-language note they can read in two minutes.

  • Weekly history of your position

    A saved email each week lets you compare receivables over months and notice whether customers are paying slower than they used to. Spotting slower payment trends early gives you time to tighten terms before cash runs low.

How it works

What happens, step by step

  1. Every Monday ClickRuntime pulls what customers owe you and the bills you still need to pay from Xero.

  2. It totals receivables and payables and compares them with last week's figures.

  3. AI writes a few sentences on what moved, such as which customer's invoice drove the change and who is worth a call.

  4. The totals and the written summary arrive in your inbox as one email.

Before it runs live

  • Connect Xero

What you get

RunsWeekly
Get a weekly snapshot of who owes whomtoday, 9:00Succeeded
Email · Weekly AR/APReceivables 48,210 / Bills 12,940 Receivables rose 6,300 since last week, mostly Northwind Traders' INV-0431. Acme Ltd is 20 days late on 3,400 and is worth a call.

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Xero steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
ar_ap_snapshot_with_ai_summary.pyexample
from clickruntime import on_trigger, credentials, http, notify, state, ai

API = "https://api.xero.com/api.xro/2.0"

def xero_headers():
    token = credentials.connection("xero", "work")
    tenant = http.get("https://api.xero.com/connections", headers={"Authorization": f"Bearer {token}"}).json()[0]["tenantId"]
    return {"Authorization": f"Bearer {token}", "xero-tenant-id": tenant, "Accept": "application/json"}

@on_trigger
def run(event):
    params = {"Statuses": "AUTHORISED", "where": "AmountDue>0"}
    invoices = http.get(f"{API}/Invoices", headers=xero_headers(), params=params).json()["Invoices"]
    ar = [i for i in invoices if i["Type"] == "ACCREC"]
    ap = [i for i in invoices if i["Type"] == "ACCPAY"]
    totals = {"receivable": sum(i["AmountDue"] for i in ar), "payable": sum(i["AmountDue"] for i in ap)}
    top = sorted(ar, key=lambda i: -i["AmountDue"])[:5]
    facts = f"This week: {totals}. Last week: {state.get('totals')}.\nLargest unpaid: " + "; ".join(
        f"{i['Contact']['Name']} {i['AmountDue']:,.0f} due {i['DueDateString'][:10]}" for i in top)
    summary = ai.generate(facts, system="In 3-4 sentences, say what changed and which invoices to chase.", max_output_tokens=200).text
    notify.email_me(f"Receivables {totals['receivable']:,.0f} / Bills {totals['payable']:,.0f}", summary + "\n\n" + facts)
    state.set("totals", totals)
    return totals

FAQ

Common questions

Does the AI change anything in Xero?
No. It reads aged receivables and open bills and produces a written summary. Nothing in your Xero organisation is created, edited or paid, so the risk to your books is nil. The email is only a report.
Which customers and suppliers are included?
Everyone with an outstanding balance in the aged receivables report and every unpaid bill is included in the totals. The summary focuses on the largest and oldest amounts, and your AI assistant can ask it to show a set number of top names.
Can I get it for multiple Xero organisations?
Each connection is to one organisation, so a bookkeeper with several clients would set up one run per organisation. They can all email the same address with the client name in the subject so the reports are easy to tell apart.
What permissions does it need?
accounting.reports.read, accounting.transactions.read. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it runs (weekly). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Get a weekly snapshot of who owes whom” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.