Tone-aware overdue invoice chaser for Xero

By General Input

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.

Integrations

  • Xero
  • Gmail
  • Slack

Type

Agentic Task

Categories

  • Finance
  • Operations

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.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsChase the paperwork every new client and vendor still owesFile Gmail attachments into storage with names you can findWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teams