Tone-aware overdue invoice chaser for Xero
Every weekday at 8am, send personalised dunning emails to overdue Xero customers and post a Slack summary of who got chased and how much is outstanding.
Build me an overdue-invoice dunning agent that runs on a cron every weekday at 8am in my local time zone.
Each run, use Xero List Invoices to fetch every invoice with status AUTHORISED whose DueDate is in the past. Group the results by contact. For each contact, call Xero Aged Receivables by Contact Report to enrich them with their total outstanding balance and aging buckets (Current, 1-30, 31-60, 61-90, 90+).
For each overdue contact, draft a personalised reminder email whose tone scales with how overdue their oldest invoice is. 1 to 14 days late: a friendly nudge that lists the invoice numbers, amounts, and due dates. 15 to 45 days late: a firmer follow-up that also includes the full statement of outstanding invoices and the total amount due. 46+ days late: an escalation note that signals the account is being flagged for human review and asks the customer to reply with a payment plan. Keep the writing warm and professional, use the contact's first name when available, and reference real invoice numbers and dollar amounts from Xero, never placeholders.
Send each draft as a real email via Gmail Send a Message to the contact's primary email address on file in Xero. Use a clear subject line that includes the customer name and the total amount overdue.
After all emails have been sent, post a single Slack summary via Slack Send a Message to a channel I will configure (default #finance). The summary should list each customer that was emailed, the total dollars chased across the run, and a separate callout for any accounts that hit the 46+ day escalation threshold.
Guardrails. Do not double-send: before emailing a contact, check whether they were already chased in the last N days (default 4) and skip them if so. Track this in agent memory or a small state file so consecutive runs do not repeat. Never email a contact whose overdue invoices are fully offset by a credit note or overpayment in Xero, even if the invoice still shows as AUTHORISED. If Xero returns zero overdue invoices, skip the email step entirely and post a short 'nothing to chase today' note to Slack.
Make the schedule, the Slack channel, the look-back window, and the tone-band cutoffs (14 days, 45 days) easy to change at the top of the instructions.
Additional information
What does this prompt do?
- Pulls every overdue invoice from Xero each weekday morning and groups them by customer
- Drafts a personalised reminder email whose tone scales with how late the oldest invoice is, from a friendly nudge to a firm follow-up to an escalation note
- Sends each reminder from your Gmail to the customer's primary contact and skips anyone with a credit note or overpayment already on file
- Posts a single Slack summary listing who was chased, the total dollars chased, and any accounts that have crossed the escalation threshold
What do I need to use this?
- A Xero account with permission to read invoices, contacts, and the Aged Receivables report
- A Gmail account that the reminders will be sent from
- A Slack workspace and a channel where the daily summary should be posted
How can I customize it?
- Change the send time, the days it runs, or the time zone the schedule uses
- Adjust the tone bands, for example treat anything past 30 days as the firm follow-up instead of 45
- Pick a different Slack channel for the summary or route escalations to a separate channel
- Tune the look-back window that prevents chasing the same customer twice in the same week
Frequently asked questions
Will this email customers who have already paid?
How does the tone change as an invoice gets older?
Can it chase the same customer every single morning?
Does it send the reminders from a shared inbox or from me?
What ends up in the Slack summary?
Stop manually chasing every overdue invoice.
Connect Xero, Gmail, and Slack once, and Geni handles the weekday morning dunning run for you.