← Back to library

Tidy inconsistent invoice files and send the monthly batch

minicoohei, writing on note.com, points a coding agent at a folder of invoices that arrive under messy names and mixed formats. The agent reads each file, then renames and sorts them for accounting. A second routine builds the monthly send from a CSV you append to, adjusting PDFs and checking recipients before anything goes out.

  • OutcomeHand off the monthly invoice chore, renaming and sorting messy files, then preparing the send, to an agent working in a folder on your computer.
  • SetupUnder an hour
  • LevelIntermediate
  • Creditminicoohei
View original
Works with
Custom agent

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 23, 2026

When should you use it?

  • Invoices arrive under messy filenames and mixed formats
  • You repeat the same monthly invoice send
  • You can let an agent work in a local folder

Not for: Sending invoices to clients without a human check; Handling files you cannot keep on the local machine

What do you need, and what do you get?

You need

  • The directory holding this month's invoices
  • A coding agent with file access
  • A CSV of recipients and details

You get

  • Invoices renamed and sorted for accounting
  • A prepared monthly send with attachments
  • A CSV-driven flow that scales as files grow

How does it work, step by step?

  1. Open the folder in the agentGive it access to the directory holding the invoices.
  2. Describe the tidy-upTell it the naming convention and where each file type should go.
  3. Let it read and sortIt reads contents, renames consistently and moves files into place.
  4. Prepare the monthly sendHave it adjust the PDF, attach it and check recipients against the CSV.
  5. Keep approval on sendingReview the batch before anything goes out; append to the CSV as files grow.

The prompt

Our own prompt, inspired by minicoohei and written to work in Custom agent. Values in lime are placeholders.

Prompt0 variables
Open the directory [path] holding this month's invoices. Read the contents of each, then rename them to the convention [convention] and move them into the right subfolders for accounting. Work on copies first and list the proposed renames for my OK before applying them. Separately, for the monthly send, use the recipients and details in [CSV] to adjust each PDF invoice and prepare the emails with attachments, but do not send; let me review and release the batch.

Inspired by minicoohei: I used the AI Agent 'Cursor' to its limit for work, and I felt like Iron Man. It's just like JARVIS.|minicoohei. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.

What can go wrong?

  • Verify the rename logic on a copy first, so no original is lost to a bad rule.
  • Keep a human approving the actual send; the agent prepares, you release.

Our take

minicoohei's framing is worth borrowing: automate the small, recurring chores as they appear, rather than waiting for a grand project. Opening a folder and describing the naming convention is often enough for an agent to do the clerical sorting that eats an afternoon each month. Run the rename on copies first, or in a dry-run mode, so a misunderstood rule does not scramble the only set of invoices you have. Keep originals until accounting confirms the batch is complete. For the monthly send, let the agent prepare attachments and check the recipient list, but keep the actual send behind your approval; a wrong address on an invoice is awkward and sometimes expensive. Tell it the exact naming pattern accounting expects, including date formats and client codes, and ask it to flag files it could not classify instead of guessing. Store the CSV of recipients separately from the invoices, and review it each month for leavers and new clients. A short log of what was renamed and what was sent makes audits easier later.

Where the time goes back: A recurring ten-to-twenty-minute invoice chore, multiplied across people and months, becomes a quick instruction and a review.

FAQ

What does it organize by?
It reads each file's contents to rename and sort consistently, not just by the original filename.
How does the monthly send scale?
You add rows to a CSV; the flow handles more files without extra setup.

Source and credit

Inspired by minicoohei. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.

Inspired by
I used the AI Agent 'Cursor' to its limit for work, and I felt like Iron Man. It's just like JARVIS.|minicoohei
Creator
minicoohei
Published on
note.com
Original date
Jul 1, 2025
License
Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
Originally for
Custom agent
AI dry run
Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in Finance & Accounting

All 62 Finance & Accounting playbooks →

Related playbooks

Finance & AccountingPrompt✓ AI dry run

Set up a finance assistant that can look but never pay

Have your assistant design a money helper with three tiers: it reads approved financial sources and sends a weekly review, drafts invoices, reminders and cancellations for you to check, and needs your explicit yes for every payment, refund, transfer or purchase, all proposed to you before anything is built.

Credit: Michael Fenech (@Michael_Fenech_)

Under an hour
Finance & AccountingWorkflow✓ AI dry run

Auto-file emailed invoices by month for your accountant

Every invoice that reaches Gmail is saved as a PDF in a year and month folder in Google Drive and logged in that month's sheet, ready to share with your accountant at month end.

Credit: Ioana Frincu

Under an hour
Finance & AccountingPrompt✓ AI dry run

Build your own CRE underwriting model with a coding agent

An Excel cash-flow model shaped around how you underwrite, built and extended with a coding agent instead of outsourced runs of a rigid tool.

Credit: u/rajuabju on r/ClaudeAI

Under an hour
Finance & AccountingPrompt✓ AI dry run

Review each AI project on its own line before budget lock

Give each AI tool and pilot its own cost line, owner and payback date, write the cut rules before you look at results, and walk into budget review with a short list to keep, fix or end.

Credit: Glenn Hopper

Under an hour