Just automated my entire bookkeeping pipeline with an AI agent + Xero API. Bank statement drops in Telegram → agent parses it → generates CSV → uploads via Puppeteer → creates matching transactions → auto-categorizes everything. I pasted the exact steps below. Copy-paste this to automate your own workflow too. The setup: - Xero OAuth2 app (free) - Counterparty mapping (JSON file that maps vendors to accounts + tax codes) - Puppeteer for CSV upload (Xero's Bank Feeds API is closed to non-financial institutions) - API calls to create matching bank transactions How it works: Xero reconciliation has two halves. Left side = statement lines (from CSV import). Right side = matching transactions (from API). When both exist, Xero auto-suggests the match. You just hit OK. The counterparty map is the brain. Simple JSON: "Google Workspace": { "account": "485", "tax": "NONE" } "Wise Charges": { "account": "404", "tax": "NONE" } Agent matches statement descriptions to this map. Unknown vendors get flagged for manual review. Gotchas that’ll save you hours: - Wise fee lines ("Wise Charges for: CARD-...") must map to Wise/bank fees, not the vendor - Tax type INPUT/OUTPUT needs LineAmountTypes: "Inclusive", not "NoTax" - Inter-account transfers need the BankTransfers endpoint, not BankTransactions Bonus: receipt flow. Agent creates bills, pays them via the right account, and attaches photos of receipts directly to the invoice in Xero. Forwarded 3 hotel booking screenshots, bills created + paid + receipts attached in one go. The whole thing runs as a skill file my agent can pick up anytime. Next bank statement that drops, same pipeline runs automatically. Total build time: one afternoon. ROI: every month from now on. If you’re a solo founder doing your own books, this is the move.
Complete automation guide with specific steps
Open on X · Boost ♥ · Permanent page
Filed under Workflows by the model because: Complete automation guide with specific steps. The rules.
