AP Reporting Agent Flow
AI automation · AI agents, Excel
Stakeholder request to Excel report across 7 departments
An n8n-style workflow builder where AI agents for each department take a report request from intake to a formatted Excel workbook. It is modeled on the payables reporting I ran at Citi, with a 3-business-day SLA and a manager sign-off.
n8n · JavaScript · SQL · ExcelJS · Claude · Prompt design
How I did it
- Mapped my Citi reporting process into seven department lanes: stakeholders, intake, data engineering, data quality, analytics, reporting and management review.
- Gave every AI agent an editable role and task. Nodes can be added, removed, reordered, deactivated or moved between departments, and missing steps are flagged before a run.
- Kept the numbers deterministic on a 900-invoice sample ledger: a read-only SQL extract by date range, FX to USD, duplicate and null checks with control-total reconciliation, aging buckets and supplier health scores.
- Added a human approval step that can send the run back to Analytics with feedback, which produces a new revision of the report.
- Generated a styled .xlsx in the browser with ExcelJS: summary, aging by region, supplier health, open invoices, data quality, agent notes and the run log.
- Rebuilt the same flow as an importable n8n workflow: a request form trigger, Claude agent nodes, a priority switch, Postgres extract, validation gate, Gmail approval with a send-back loop, Excel file and a Google Sheets tracker, with each department as a swimlane.