How to Use Claude to Build a Spend Report from Raw ERP Exports
Step-by-step guide to using Claude to turn a messy ERP export into a clean spend report: cleanup prompts, analysis prompts, a CFO summary, and where Claude stops.
Every finance team knows the file.
You export spend data from your ERP, NetSuite, Sage Intacct, Dynamics 365, Workday, SAP, and what lands in your downloads folder is a mess. Forty columns you don't need. Vendor names formatted five different ways. Dates in a format nothing likes. Subtotal rows breaking up the data. GL codes with no descriptions.
Somewhere in that file is the spend report your CFO asked for. Getting it out has traditionally meant hours in Excel, pivot tables, VLOOKUPs, manual cleanup, formatting, or a BI tool you don't have the budget or the data team to run.
Claude can do most of that work in minutes. Upload the raw export, and Claude will clean it, analyse it, and build you a structured spend report, no SQL, no pivot tables, no BI tool.
This is Post 2 of the Claude for AP Teams series. In Post 1, we covered extracting line items from scanned invoices. This post picks up where your ERP data already lives, in a messy export, and turns it into something you can actually put in front of leadership.
We'll cover how to prepare and upload your export, the exact prompts to clean and analyse it, how to build a CFO-ready summary, and, honestly, where Claude stops and a purpose-built system takes over.
What Claude Can Do With a Raw ERP Export
Before the prompts, a clear picture of what Claude handles well here, and what it doesn't.
What Claude does well:
- Reads a messy CSV or Excel export and understands the structure without you explaining it
- Cleans inconsistent formatting, vendor names, dates, currency, GL codes
- Aggregates spend by vendor, category, department, or time period
- Identifies patterns, outliers, and anomalies in the data
- Builds structured tables and written summaries
- Interprets the data in plain English for a non-finance audience
What Claude can't do here
- Connect to your ERP directly to pull data, you export it, Claude reads what you give it
- Generate live, interactive charts (it describes and structures the data; you'd build visuals separately)
- Remember last month's export, unless you provide it for comparison
- Update automatically; each report is a point-in-time analysis you run
The honest framing
Claude is exceptional at turning a raw, ugly export into a clean, interpreted spend report in a single session. It's not a live dashboard. But for the monthly or quarterly spend report that most mid-market finance teams actually need, it does the job in a fraction of the time.
Step 1: Export the Right Data from Your ERP
The report is only as good as the export. Before you touch Claude, pull the right fields.
Fields to include in your export:
- Transaction or invoice date
- Vendor or supplier name
- Invoice or transaction amount
- Currency
- GL account code and, if available, GL description
- Department or cost centre
- PO number (if applicable)
- Payment status (paid, open, pending)
- Transaction type or category
A few export tips
Export as CSV if your ERP gives you the option, it's cleaner than Excel for this. Pull at least a full period, a month minimum, a quarter or year is better for trend analysis. Don't pre-filter or pre-format in Excel first. Claude handles the raw export better than a half-cleaned one, because manual cleanup often introduces its own inconsistencies. Just export and upload.
Then open Claude, start a new conversation, and attach the file using the paperclip icon.
Step 2: Let Claude Assess the Data First
Don't jump straight to analysis. Have Claude tell you what's actually in the file first, this catches problems before they contaminate your report.
PROMPT 1: Data Assessment
I've uploaded a raw spend data export from our ERP. Before we analyse it, assess the data and tell me: 1. How many rows of transaction data are there (excluding headers and any subtotal rows)? 2. What columns are present, and which ones are relevant for spend analysis? 3. What date range does the data cover? 4. How many unique vendors appear? 5. Are there any vendor names that look like duplicates or variations of each other (e.g. "Acme Ltd" and "Acme Limited")? 6. Are there any rows with blank, zero, or negative amounts? 7. Are there any subtotal, header, or junk rows mixed into the data that should be excluded? 8. Is there anything inconsistent or messy about the formatting (dates, currency, amounts) that we should clean up first? Give me a plain summary of what's in the file and flag anything that needs attention before we build the report.
What to do with the output
Claude will read the file and tell you exactly what it's working with, including the messy parts you might not have spotted. Fix any genuine data errors it flags. For formatting inconsistencies, the next prompt handles them.
Step 3: Clean the Data
Now have Claude standardise the messy formatting. This is the step that would otherwise eat an hour in Excel.
PROMPT 2: Data Cleanup
Clean up the spend data with the following rules: 1. VENDOR NAMES Standardise vendor names so variations are treated as one (e.g. "Acme Ltd", "Acme Limited", and "ACME" all become one vendor). List every merge you make so I can confirm it's correct. 2. EXCLUDE JUNK ROWS Remove any subtotal rows, header repeats, blank rows, or non-transaction rows. 3. DATES Standardise all dates to YYYY-MM-DD format. 4. AMOUNTS Ensure all amounts are clean numbers. Flag any negative amounts separately; these may be credits or corrections, and I want to review them, not include them silently. 5. MISSING DATA Flag any rows missing a vendor, amount, or date, don't guess or fill them in. After cleaning, tell me: - How many rows remain - How many vendor merges you made - How many rows you flagged or excluded and why - The clean total spend figure Do not analyse yet, just clean and confirm the data is ready.
Why the vendor-merge list matters
The instruction to list every vendor merge matters. Vendor name standardisation is where automated cleanup can go wrong, merging two vendors that are genuinely different. Reviewing the merge list takes 30 seconds and prevents a report built on a bad assumption.
Step 4: Build the Spend Report
With clean data confirmed, build the report itself. This is the core prompt.
PROMPT 3: Spend Report
Using the cleaned data, build a complete spend report with the following sections: SECTION 1: SPEND OVERVIEW - Total spend for the period - Number of transactions - Number of active vendors - Average transaction value - Period covered SECTION 2: SPEND BY VENDOR - Top 15 vendors by total spend - For each: vendor name, total spend, transaction count, % of total spend - Vendor concentration: what % of total spend goes to the top 5, top 10, and top 20 vendors - Flag any single vendor above 15% of total spend SECTION 3: SPEND BY CATEGORY / GL - Total spend per GL account or category - Each as a % of total - Ranked highest to lowest SECTION 4: SPEND BY DEPARTMENT - Total spend per department or cost centre - Each as a % of total SECTION 5: TIME TREND - Spend by month across the period - Flag any month with an unusual spike or drop Present each section as a clean table. Do not add commentary yet, just the structured data. I'll ask for the summary next.
Reconcile before you trust
Claude will produce the full structured report. Because you cleaned the data first, the numbers will reconcile, the vendor totals will sum to the overall total, the percentages will add up. Spot-check the total against your ERP's own total as a sanity check.
Step 5: Surface the Insights
A table of numbers isn't a report, the interpretation is. This prompt turns the data into findings.
PROMPT 4: Insight Analysis
Now analyse the spend report you just built and surface the insights a finance leader would care about. Identify: 1. VENDOR CONCENTRATION RISK Any over-reliance on a small number of vendors and what it means for negotiating leverage and supply risk. 2. SPEND ANOMALIES Any vendor, category, or month that looks unusual, significantly higher or lower than expected, or inconsistent with the rest of the data. 3. CONSOLIDATION OPPORTUNITIES Any category where spend is spread across many vendors that could potentially be consolidated for better rates. 4. TAIL SPEND How much of total spend sits in small, scattered transactions, the long tail that's often unmanaged. For each insight, give me: - The finding (one sentence) - Why it matters (one sentence) - A suggested action Be specific and reference the actual numbers from the report.
Where Claude earns its place
This is where Claude earns its place. It doesn't just aggregate, it interprets, flagging the concentration risks and consolidation opportunities that turn a backward-looking spend report into a forward-looking cost conversation.
Step 6: The CFO Summary
Finally, pull it all into a summary that goes to leadership.
PROMPT 5: CFO Executive Summary
Based on the full spend report and analysis, write a one-page executive summary for the CFO. Structure it as: HEADLINE METRICS (3-4 bullets): - Total spend, vendor count, top category, top vendor concentration KEY FINDINGS (4-5 bullets): - The most important insights from the analysis RECOMMENDED ACTIONS (numbered, max 4): - Specific, actionable next steps WATCH LIST (max 3): - Items to monitor that don't need action yet Keep it under 250 words. Plain English. No jargon. Write for a CFO and executive team audience. Every claim should tie back to a number in the report.
What to do with the summary
Copy this into your monthly finance pack, a slide, or an email. It's the deliverable your CFO actually reads, the tables underneath are the supporting evidence.
Turning This Into a Repeatable Monthly Process
Once you've run this once, the monthly version takes under 30 minutes.
- Export the period's data from your ERP with the same fields every time.
- Upload to Claude.
- Run Prompt 1 (assess), Prompt 2 (clean), Prompt 3 (build), Prompt 4 (insights), Prompt 5 (summary), in sequence. Done.
One thing that makes month two better
When you run it the second month, upload the prior month's report alongside the new export and add this to Prompt 4:
PROMPT 6: Month-over-Month Addition
I've also uploaded last month's spend report. In your analysis, include a month-over-month comparison, what changed, which vendors grew or shrank, and any new vendors that appeared this month.
Why month-over-month matters
Month-over-month comparison is where spend reporting gets genuinely useful, it turns a static snapshot into a trend you can act on. New vendors appearing, spend growing in a category, a vendor's share creeping up: these are the signals that matter, and they only show up in comparison.
When Claude Isn't Enough
Claude is excellent at turning a raw export into a clean, interpreted spend report. But it's worth being clear about what it isn't, because the limits define where a different kind of tool takes over.
It's point-in-time, not continuous. Claude analyses the export you give it, when you give it. It doesn't watch your spend as it happens. An anomaly that appears mid-month waits until your next export to surface, by which point the money may already be gone.
It has no memory of your data. Each session starts fresh. Claude doesn't know last quarter's numbers, this vendor's contract terms, or what "normal" looks like for your organisation, unless you paste it in every time.
It can't validate spend against contracts. Claude will show you that a vendor's spend grew 30%. It can't tell you whether that growth breached a contracted rate cap, because it doesn't have your contracts.
It can't act. The report is an output. Claude can't hold a payment, flag an off-contract purchase before it happens, or route an anomaly to the right person. It informs. It doesn't govern.
It depends on the export. If the data isn't in the export, it isn't in the report. Committed-but-uninvoiced spend, off-system purchases, and shadow spend never make it into the ERP export in the first place, so they never make it into the analysis.
For a lot of finance teams, a clean monthly spend report is exactly what's needed, and Claude delivers it faster than any manual process. But there's a point, usually when spend volume climbs, or leadership wants real-time visibility, or contract compliance starts to matter, where a point-in-time report stops being enough.
Where Blackbee AI picks up
That's where an agentic Intake-to-Pay platform picks up. Blackbee AI doesn't wait for an export. Its Spend Intelligence Agent monitors spend continuously, above your ERP, surfacing anomalies as they appear rather than at month-end, validating spend against contracts automatically, and giving the CFO a live view of committed and actual spend across every vendor and department. Where Claude builds you a report from the data you extract, Blackbee AI governs the spend as it happens and keeps the picture current without anyone running a prompt. If your team is processing 200+ transactions a month and a monthly report is starting to lag behind the pace of your spend, see how the Spend Intelligence Agent works.