To rename receipt PDFs automatically, read the supplier and receipt date from each document, turn those fields into a filename, and check for conflicts before saving the result. Keep documents with unclear details in a review list rather than guessing.
Work on copies at first. A readable filename helps you find the document; the original PDF remains the evidence of what you bought.
Choose a naming convention
A short pattern is easier to maintain than one containing every field on the receipt:
YYYY-MM-DD_supplier_reference.pdf
For a fictional receipt dated 3 November 2026 from Northfield Supplies, with reference R-1042, the result would be 2026-11-03_northfield-supplies_R-1042.pdf.
Use the date printed on the receipt, not the date the file was downloaded. Decide how you want to handle documents that show both an order date and a payment date. If the intended date cannot be identified, leave the file unchanged and ask for review.
Normalise supplier names with a small mapping you control. “Northfield Supplies Ltd” and “Northfield Supplies” can become the same filename label. Do not merge similarly named businesses without checking them.
Option 1: For a small batch, prepare a rename list
For ten receipts, opening the documents and filling a two-column list of old and new filenames may be quicker than maintaining a recurring workflow. You can still use a bulk rename tool to apply an approved mapping.
The key distinction is where the new name comes from. A tool that replaces text in existing filenames cannot discover a receipt date hidden inside a PDF. It needs either an input mapping or a document-reading step.
Before applying the list, check that each proposed name ends in .pdf, removes characters your operating system cannot use, and does not overwrite another file.
Option 2: Create a receipt naming workflow with Pillow
Pillow is an AI assistant that helps you build repeatable automations from plain-English instructions. Its workflow builder lets you inspect the steps and refine the process before enabling it.
For receipt naming, give Pillow the input folder and your filename rules. Start by asking for a proposed rename table so you can check the extracted dates and supplier names before any copies are written.
Connect the accounts or folders the workflow needs and review any missing actions or settings Pillow identifies. Copy this prompt into Pillow to start:
Prepare a receipt-PDF naming workflow for a folder I choose.
Read each PDF and propose this filename:YYYY-MM-DD_supplier_reference.pdfUse the receipt date printed in the document, not the download date.Ask me which date to use if more than one date could fit. Normalisesupplier names using a mapping I approve. Use the printed reference;if it is missing, flag the file for review rather than inventing one.
Show a table with original path, extracted supplier, date, reference,proposed filename and any uncertainty. Flag scans needing OCR, unreadabledocuments, invalid filename characters and destination collisions.
First create the rename plan only. After I approve it, copy the PDFs toa separate output folder under the new names. Preserve the originals,never overwrite an existing file, and save a manifest linking each copyto its source. Make repeat runs skip copies already recorded.
Tell me which file-access or document-reading capabilities are missing.Keep any recurring workflow disabled until I have reviewed the result.Copy the prompt above, then open Pillow to build your automation.
Option 3: Build a Windows flow with Power Automate Desktop
Power Automate Desktop has an Extract text from PDF action and file actions for copying and renaming. Those give you the building blocks for a local flow.
Use a folder containing copies of a few representative receipts:
- Get the PDF files in the folder and process them one at a time.
- Extract the text. If the result is empty or the relevant fields are unreadable, add the file to a review list.
- For a consistent supplier layout, identify labelled values such as “Receipt date” and “Receipt number”. With mixed layouts, use a document extraction service or a separate review step rather than one broad date-matching rule.
- Normalise the supplier, date and reference into the chosen filename. Keep the extracted values and original path in a manifest.
- Check whether the destination name exists. A matching name is a collision to resolve, not permission to replace the file.
- Copy the document into an output folder using the approved name. Record the result alongside the original filename.
A scan may look readable to you while containing no selectable text. That needs OCR before field extraction. OCR can also misread a date or reference, so retain the review path even after adding it.
Start with the supplier formats you receive most often. Expanding a working rule to every possible receipt layout is a separate job.
Prepare an input folder, output folder and rename manifest
Use three clearly named locations: Receipts/input, Receipts/named and Receipts/review. Keep the originals in input. The review folder can hold copies of uncertain documents, but a manifest with links to the originals is often enough and avoids creating another collection to maintain.
For the first batch, choose examples from several suppliers. Include a text-based PDF, a scanned receipt, two receipts from the same day and a document with more than one date. The point is to exercise the naming rules you will actually need.
Create a manifest with original path, source identifier, supplier, raw date, normalised date, reference, proposed path, result and reason. Keep the raw date as well as the converted value. If 03/11/26 was interpreted incorrectly, you can correct the interpretation without extracting the document again.
Use a stable source identifier, such as a content checksum, when you need to recognise the same document under another filename. A filename alone is not enough: downloading receipt.pdf twice may produce receipt (1).pdf, while two different purchases may arrive with exactly the same name. Decide whether identical files from different locations should share one output or remain separately recorded.
Make the PDF extraction step inspectable
In Power Automate Desktop, use a file-list action to select the input PDFs, then a loop to process one file at a time. Pass the current file into Extract text from PDF. Inspect the extracted text for your sample documents before attempting to extract dates from it. Microsoft also documents an option to optimise extraction for structured data; compare the resulting layout when fields are arranged in columns. PDF action options.
For a consistent supplier format, look for the value beside a specific label. “Receipt date” is a better starting point than the first number resembling a date anywhere on the page. A document may also contain an order date, a payment deadline and a footer copyright year.
When a scan needs OCR, keep that as a separate step with its own result. An OCR service can return plausible text even when one character is wrong. Check references containing similar characters, such as O and 0, against the document before approving the name. Password-protected or damaged PDFs belong in the exception list until they can be read through an authorised method.
Normalise the name only after the fields have been checked:
- Convert the agreed date to
YYYY-MM-DD. - Map the supplier to its approved short name.
- Remove invalid filename characters from the supplier and reference fields.
- Collapse repeated spaces or separators and keep the name reasonably short.
- Check the complete output path for an existing file before copying.
Keep the original reference in the manifest if its filename-safe version differs. If a proposed path already exists, compare the source identifiers. The same source can be skipped; a different source needs a deliberate distinguishing suffix. Do not overwrite either document simply because their extracted fields happen to match.
After approval, copy the PDFs and record the resulting paths. Count successful copies, skipped duplicates and unresolved files separately. Those three numbers should explain the whole input batch.
Handle collisions and unreadable files
Two receipts from the same supplier on the same day may be legitimate. A reference or stable source identifier distinguishes them. Do not append a new random suffix on every run, because that creates fresh copies of the same document.
For a failed read, report the filename and the missing field. “Date unclear: 03/11/26” is more useful than “Processing error”. If your suppliers use different date formats, make that rule explicit before interpreting numeric dates.
You can use the same approach after collecting invoice PDFs from Gmail. Keep collection and naming as separate steps so a naming problem does not stop you preserving the source file.
Questions about automatically renaming receipts
Can a bulk rename tool read the date inside a PDF?
Only if it includes a document-reading capability or receives an extracted mapping from another step. Ordinary filename replacement rules operate on the existing name, not the text printed inside the receipt.
Should I include the amount in the filename?
You can, but it adds another field that can be misread and needs a currency convention. Supplier, date and reference usually make a practical starting point. Keep other extracted details in the manifest if they help you search.
What if the receipt has no reference number?
Put it in review first. You can approve a stable source-ID suffix as your fallback, but keep that separate from a printed receipt number. Reuse the same suffix on subsequent runs so the fallback does not create a new file each time.