On a schedule
Post overdue Xero invoices to Slack every weekday
Every weekday morning, your finance channel sees unpaid Xero invoices grouped by how late they are, with totals for each group.
- Runs
- On a schedule
- Apps
- Slack, Xero
- AI
- Not needed
- Access
- accounting.transactions.read; chat:write
Send this to your assistant
Create a ClickRuntime automation: each weekday at 9am, pull unpaid Xero invoices, group them into 1–7, 8–30 and 30+ days overdue, and post the list to #finance.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
The aged receivables report in Xero is useful, but only to people who open it. In most small companies that's one person, and when they're on holiday nobody looks.
A short list in Slack each weekday puts overdue invoices in front of the whole finance team and account managers, grouped so the oldest debts stand out.
What you get out of it
Overdue invoices stay visible
The list appears every weekday, so late payments can't drift unnoticed.
Oldest debts stand out
Grouping by age shows where to spend chasing time first.
Account managers can help
People who know the client see who's late and can raise it in their next conversation.
No Xero login needed
Anyone in the channel can follow collections without access to the books.
How it works
What happens, step by step
Each weekday at 9am, ClickRuntime asks Xero for approved sales invoices with money still owed.
It keeps the ones past their due date and groups them into 1–7, 8–30 and over 30 days late.
It posts each group, with customer names, amounts and a total, to #finance in Slack.
Before it runs live
- Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
- 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 Google Sheets
- Combine it with other Slack and 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
XERO = "https://api.xero.com/api.xro/2.0"
TENANT = "your-xero-tenant-id"
def xero(method, path, **kw):
r = http.request(method, XERO + path, **kw, headers={"Accept": "application/json", "Xero-tenant-id": TENANT, "Authorization": "Bearer " + credentials.connection("xero", "company")})
return r.raise_for_status() or r.json()
@on_trigger
def run(event):
invoices = xero("GET", "/Invoices", params={"Statuses": "AUTHORISED", "where": 'Type=="ACCREC"'})["Invoices"]
groups = {"1–7 days": [], "8–30 days": [], "30+ days": []}
for inv in invoices:
days = (date.today() - date.fromisoformat(inv["DueDateString"][:10])).days
if days > 0 and inv["AmountDue"] > 0:
groups["1–7 days" if days <= 7 else "8–30 days" if days <= 30 else "30+ days"].append(inv)
lines = []
for name, items in groups.items():
if items:
lines.append(f"*{name}* – {sum(i['AmountDue'] for i in items):,.2f}")
lines += [f"• {i['Contact']['Name']} {i['InvoiceNumber']}: {i['AmountDue']:,.2f}" for i in items]
notify.slack("\n".join(lines) or "No overdue invoices today :tada:", channel="#finance")
return {k: len(v) for k, v in groups.items()}FAQ
Common questions
Which invoices are included?
Is it the same as Xero's aged receivables report?
What if nothing is overdue?
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
Draft a Xero invoice for each won deal and approve it in Slack
When a deal is won or an order arrives, a draft Xero invoice is created and posted to Slack, where one click approves it.
See how it worksApprove supplier invoices in Slack before they go into Xero
New supplier invoices are read and posted to Slack with Approve and Reject buttons, and approved ones become bills in Xero.
See how it worksKnow the moment your website goes down
Your team hears in Slack when the site stops responding or slows down, and again when it's back.
See how it worksKeep exploring
Set up “Post overdue Xero invoices to Slack every weekday” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.