Chase overdue FlowAccount bills every Monday
An agent that reads overdue billing notes and tax invoices from FlowAccount through FlowAccount's own MCP server in read only mode, checks receipts for each customer, and drafts polite Thai payment reminders in Gmail for the owner to check and send
The problem
Thai SMEs that give customers credit terms issue billing notes and tax invoices in FlowAccount, then someone has to scroll through every document each week to see who is past the due date and still has not paid. The reminders go out late or not at all, because writing a polite Thai follow up to a regular customer feels awkward, and the cash stays with customers longer than it should.
How the agent works
It starts
Every Monday morning a Claude Code routine starts FlowAccount's open source MCP server with the company's Open API credentials in its default read only mode, which exposes only GET tools such as list_tax_invoices, get_tax_invoice, list_receipts and list_contacts.
The agent works
The agent pulls the last few months of billing notes and tax invoices with the server's date filters, keeps the ones whose dueDate has passed, and checks the receipts issued since then for the same customer; anything that looks paid, part paid or short by withholding tax is put on a 'verify' list instead of being chased. For each remaining customer it groups every overdue document into one reminder in Thai (or English for foreign clients), with document numbers, amounts and due dates taken from FlowAccount and the company's receiving bank account read from FlowAccount, never typed from memory or copied from an email. Each reminder is saved as a Gmail draft through the Gmail connector, and the owner gets a summary table of customer, documents, days overdue and total, plus the verify list.
The result
The accountant checks the verify list against the bank statement, the owner reads the drafts and sends them, and the agent never gets write access to FlowAccount.
Worked example
The api-mcp README in FlowAccount's open-api repository on GitHub describes a local stdio MCP server, one process per company, that reads credentials from ~/.config/flowaccount/openapi.json, signs in with the client_credentials grant and keeps the Authorization header away from the model. It exposes 34 read only GET tools by default; --allow-write raises that to 166 tools including create, payment and delete, and the README warns that those writes are real and should be tried on the sandbox first. The bundled API spec shows due date fields (dueDate, creditDays) and contact fields (contactName, contactEmail, contactTaxId) on documents, and FlowAccount also offers a hosted AI Connector at mcp.flowaccount.com that signs in by browser OAuth for owners without Open API credentials. The reminder pattern follows Anthropic's invoice-chase skill: one email per customer covering all their overdue invoices, recent payers set aside as 'possibly paid, verify', and nothing queued without the owner's approval; that skill supports Xero, QuickBooks and other ledgers but not FlowAccount, which is the gap the MCP server fills. Neither source reports a customer result, so measure your own: the overdue total each Monday and the days from due date to payment.
Join the Agent OS Club
8 weeks to the AI team a 50 person company would hire. Instant access to our agent blueprints. USD 15 a month, cancel any time.
Join the Agent OS ClubBuilding this for an organization? Learn more at theagentiv.com
Sources
- https://github.com/flowaccount/open-api
- https://raw.githubusercontent.com/flowaccount/open-api/master/libs/api-mcp/README.md
- https://raw.githubusercontent.com/flowaccount/open-api/master/libs/api-spec/src/api-spec.openapi.json
- https://claude.com/connectors/gmail
- https://raw.githubusercontent.com/anthropics/knowledge-work-plugins/main/small-business/skills/invoice-chase/SKILL.md