Downloads
Download the n8n workflow (JSON)
saas-subscription-spend-audit-n8n-claude.json · n8n workflow · 20 steps · starts with New billing email · uses Gmail, Anthropic, Google Sheets, Slack · 33 KB
Import into n8n: Create Workflow, then the menu, then Import from File.
How to import it into n8n
- In n8n, create a new workflow.
- Open the ⋯ menu at the top right and choose Import from File, then pick the downloaded .json. (Or open the file, copy everything and paste it on the canvas.)
- Open each node with a warning and connect your own account: the file carries no passwords or keys.
- Run it once with Test workflow, check the result, then switch it to Active.
What this workflow does
Every software tool your company pays for sends an email: a receipt, an invoice or a renewal notice. This workflow reads those emails as they arrive. Claude pulls out the tool, plan, amount, currency, monthly or yearly, next renewal date and who it is billed to. Dollar bills are converted to rupees and every tool gets one row in a renewals sheet. On the 1st of each month you get one Slack report: total spend, renewals in the next 30 days, possible duplicates and tools nobody has confirmed lately. Before a tool renews, its owner gets a Slack message asking "still using it?" with Keep and Cancel buttons.
Who it is for
Startups, agencies and any team where several people sign up for tools on the company card: video calls, design, SEO, project management, AI tools, storage.
What you need
- n8n (Cloud or self-hosted)
- The Gmail inbox where software bills arrive (or a shared billing@ inbox)
- An Anthropic API key for Claude
- A Google Sheet with a
Subscriptionstab - Slack
- No key is needed for the currency rate (Frankfurter, a free public API)
The workflow, step by step
Step 1 · Catch every billing email
n8n watches Gmail for receipts, invoices and renewal notices from your software tools. Each email is read once, and marketing emails never reach the AI.
- New billing email (Gmail Trigger, every hour): searches for receipt, invoice, payment received, renewal and subscription subjects, outside the Promotions tab.
- Clean up email (Set): sender, recipient, subject, text and date.
- Already processed? (Remove Duplicates on the Gmail message id).
Step 2 · Claude reads the bill
Claude pulls out the tool, plan, amount, currency, monthly or yearly, next renewal date, seats and who it is billed to. Promotions and one-off purchases are dropped.
- Read bill with Claude (Basic LLM Chain) with Claude (temperature 0.1) and Bill fields (Structured Output Parser).
- Subscription bill? (Filter): only recurring software bills with an amount continue.
Step 3 · One renewals sheet, in rupees
Dollar bills are converted to rupees at today's rate and yearly plans are shown per month. Every tool gets one row, updated with each new bill, with its owner and next renewal.
- Get USD to INR rate (HTTP Request to the Frankfurter API).
- Monthly cost in INR (Code): converts, divides yearly plans by 12 and builds a Tool ID from tool, plan and billed-to.
- Update subscriptions sheet (Google Sheets, append or update on Tool ID).
Step 4 · A spend report on the 1st
On the 1st of every month you get one Slack message: total per month, renewals in the next 30 days, tools nobody has confirmed lately and possible duplicates.
- On the 1st at 10 AM (Schedule Trigger) and Read subscriptions (Google Sheets).
- Build spend summary (Code): monthly and yearly totals, renewals due, duplicates, unconfirmed tools, spend by category.
- Post spend report (Slack). If Slack fails, Alert: report failed emails it to you.
Step 5 · Owners confirm or cancel
Before a tool renews, its owner gets a Slack message: still using it? Keep updates the last confirmed date. Cancel flags it for finance to cancel. Nothing is cancelled automatically.
- Renewing in 30 days? (Filter).
- Ask owner: still using? (Slack Send and Wait to the owner, up to 3 days) and Keep it? (IF).
- Mark as confirmed or Mark to cancel (Google Sheets).
Setup
- Import the JSON into n8n and connect Gmail, Anthropic, Google Sheets and Slack.
- Create the
Subscriptionstab: Tool ID, Tool, Plan, Category, Billed to, Cycle, Amount, Per month (INR), Seats, Next renewal, Last bill, Owner, Owner Slack ID, Last confirmed, Status, Flagged on. ReplaceYOUR_SHEET_ID. - If bills go to several people's inboxes, ask everyone to set a Gmail filter that forwards receipts to one billing inbox, and connect that one.
- Forward the last 12 months of software receipts into the inbox once and run the first part of the workflow by hand. The sheet fills up.
- Fill in Owner and Owner Slack ID for each tool, and replace
YOUR_FINANCE_SLACK_IDand the alert email. - Run On the 1st at 10 AM by hand once to see the report, then activate.
How to customise
- Card statement too: add a monthly step that reads your card statement CSV and flags charges with no matching row (tools paid without an email).
- Usage data: for tools with an admin API (Google Workspace, Slack, Zoom), add an HTTP Request that pulls last login per seat into the sheet.
- Budget alert: add an IF after Build spend summary that pings you when the monthly total passes a number you choose.
- Approvals for new tools: pair this with a simple form where anyone requests a new tool before buying it.
Guardrails
- Nothing is cancelled automatically. The owner taps Keep or Cancel, and finance cancels by hand.
- Claude never guesses an amount. Bills without a clear amount are skipped.
- Exchange rates are reference rates, not your bank's rate. Treat rupee figures as close estimates.
- The workflow only reads emails that match the billing search, not your whole inbox.
Troubleshooting
- A tool is missing: its emails may not use the words in the Gmail search. Add the sender to the query, for example
OR from:[email protected]. - The same tool appears many times: the plan name changes between emails. Tidy the Tool ID in the sheet; future bills will update that row.
- Rupee amount is empty: the currency rate call failed. It retries 3 times; check the Frankfurter API is reachable from your n8n.
- Owner message never arrives: the Owner Slack ID must be a member id (it starts with U), not a name.
Want the members-only resources too?
A free account unlocks them all, including the ones shared in DMs.

