On a schedule
Get overdue invoices in Slack by age
Each morning Slack lists invoices overdue by 7, 14 and 30 days, without repeating ones already flagged at that stage.
- Runs
- On a schedule
- Apps
- Xero
- AI
- Not needed
- Access
- accounting.transactions.read
Send this to your assistant
Create a ClickRuntime automation: every day at 8am, post Xero sales invoices that are overdue to #accounts in Slack, grouped into 7, 14 and 30 days late.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Chasing late payers is an unpleasant job that most people put off. A customer invoice reaches 7 days overdue and nobody notices, then 14 days, then 30, and by then the polite email is now a hard conversation. Meanwhile the invoices at each stage need different actions, and nobody keeps track of which have already had a reminder.
Each morning, the automation gets all authorised invoices where an amount is still due, works out how many days each is late, and picks out those crossing the 7, 14 and 30 day thresholds. Invoices already announced at a given tier are skipped, and the rest go into a Slack post.
It is useful for credit controllers and small teams where one person doubles as finance and sales. Collections become a short daily routine in place of an occasional dreaded project.
What you get out of it
Reminders go out at the right moment
A 7-day nudge is friendly and a 30-day one is firmer. Seeing which tier each invoice reaches tells you which tone and which action fits that customer. Matching tone to age keeps good customers happy and gives slow ones a clear signal.
Nothing is announced twice
Remembering which invoices have been alerted at each threshold means the channel shows a customer only when they cross a new tier, rather than repeating the same line daily. A tidy channel means people keep reading it instead of tuning it out.
Cash flow improves with consistency
Chasing every invoice at the same point in its life tends to shorten the average time to payment, which keeps working capital from being tied up with slow payers. Faster collection means less borrowing and less stress about covering your own bills.
The morning list is short and actionable
Instead of a long aged debtors report, you read a few names and amounts that crossed a line overnight, and can start the day with three phone calls. Short lists get done, while long reports get postponed until something goes wrong.
Escalation becomes a shared process
The team sees the same tiers, so a sales rep knows to step in when a key customer reaches 30 days, rather than hearing about it from finance after the fact.
How it works
What happens, step by step
Every morning at 8, ClickRuntime pulls the approved Xero invoices that still have money owing.
It works out how many days late each one is and groups them into 7, 14 and 30 days overdue.
It skips any invoice already flagged at that stage, so you only hear about it again when it moves into the next group.
The grouped list goes to your Slack channel with the invoice number, customer, amount and days late.
Before it runs live
- Connect Xero
What you get
Build your own
Need it to work differently?
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
- Add an AI step, for example to summarize, sort or draft a reply
- 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
from datetime import date
from clickruntime import on_trigger, credentials, http, notify, state
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": 'Type=="ACCREC" AND AmountDue>0'}
invoices = http.get(f"{API}/Invoices", headers=xero_headers(), params=params).json()["Invoices"]
alerted = state.get("alerted") or {}
tiers = {30: [], 14: [], 7: []}
for inv in invoices:
late = (date.today() - date.fromisoformat(inv["DueDateString"][:10])).days
tier = next((t for t in tiers if late >= t), None)
if tier and alerted.get(inv["InvoiceID"], 0) < tier:
tiers[tier].append(f"{inv['InvoiceNumber']} {inv['Contact']['Name']}: {inv['AmountDue']:,.2f} ({late} days)")
alerted[inv["InvoiceID"]] = tier
lines = [f"*{t}+ days late*\n" + "\n".join(rows) for t, rows in tiers.items() if rows]
if lines:
notify.slack("Overdue invoices\n" + "\n".join(lines), channel="#accounts")
state.set("alerted", alerted)
return {"posted": sum(len(r) for r in tiers.values())}FAQ
Common questions
Can I change the 7, 14 and 30 day thresholds?
Does it count days from the due date or the invoice date?
What about invoices with partial payments?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
See the week's payments every Friday
A Friday email lists the payments Xero recorded this week and their total.
See how it worksGet a Monday list of bills falling due
You start the week knowing which supplier bills need paying in the next seven days.
See how it worksCompare last month's P&L with the month before
On the 1st you get profit and loss for the previous two months side by side.
See how it worksKeep exploring
Set up “Get overdue invoices in Slack by age” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.