Weekly Xero cash flow and financial health digest

By General Input

Every Monday at 8am, get a one-screen brief of last week's revenue, cash on hand, overdue customers, and upcoming bills, posted to Slack and emailed to your finance team.

Integrations

  • Xero
  • Slack
  • Gmail

Type

Agentic Task

Categories

  • Finance
  • Operations

Build me an agent workflow that delivers a weekly cash flow and financial health digest from Xero to my finance team.

Trigger: cron, every Monday at 8am in the user's local timezone (make the timezone configurable at setup). The window the digest covers is the previous Monday through Sunday.

On each run, the agent should pull the following from Xero for the configured organisation: Profit and Loss Report for last week and for month to date, Bank Summary Report for last week, Balance Sheet Report as of last Sunday, Aged Receivables by Contact Report, and Aged Payables by Contact Report. Use the documented Xero operations for each of those reports.

Xero specifics the agent must handle. Every Xero call needs a tenant ID in the Xero-Tenant-Id header. After the user connects Xero, fetch the list of authorised organisations from the connections endpoint and let the user pick which tenant this workflow reports on, then store that tenant ID with the workflow config. Xero returns dates in .NET JSON date format like /Date(1551830400000+0000)/. Parse the millisecond timestamp before formatting any date or doing arithmetic; never display the raw .NET date string. Money fields are decimals, not cents. Set Accept: application/json explicitly on every request.

From those reports, synthesise a one-screen executive brief with these sections, in this order. 1) Revenue last week vs the prior week, plus month to date vs the same point last month. 2) Cash on hand across bank accounts, plus weekly burn (cash change over the week). 3) Top three overdue customers by amount, each line showing the customer name, amount outstanding, and days past due, taken from the aged receivables report. 4) The largest bills coming due in the next 14 days from the aged payables report, with vendor, amount, and due date. 5) One or two short commentary lines from the agent flagging anything that looks off. The agent should use judgment here rather than dumping numbers: examples of things worth calling out include a meaningful revenue drop or spike, a customer slipping into a worse aging bucket, cash falling below a configurable floor, or a large bill landing in a thin cash week. If nothing is unusual, say so in one line.

Output destinations. Post the digest to a configurable Slack channel using Slack Send a Message. Format it as a Slack mrkdwn message (use *bold*, not **bold**), with clear section headers and a compact layout that fits on one screen. Also send the same brief via Gmail Send a Message to a configurable distribution list, as a clean HTML email with the same sections. Use the same content for both; reformat for the destination, do not generate two different briefs.

Configurable settings the user should set during onboarding: Xero organisation (tenant), timezone for the 8am schedule, Slack channel, Gmail recipient list, optional cash-on-hand floor for the alert, optional revenue-change threshold for the alert, optional minimum bill size for the upcoming-bills section.

Error handling. If a Xero report comes back empty or errors, include a short line in the brief saying which section is missing and why, rather than failing the whole run. Respect Xero rate limits and the Retry-After header.

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