Skip to main content

Having difficulty in dynamically renaming files ? Rename PDFs in Power Automate Using Parsed Data !

· 13 min read
SEO and Content Writer

PDFs landing in your folder as document.pdf or invoice (1).pdf are hard to find and match to the right record. You need the invoice number, PO, contract ID, or customer name right in the filename—without opening every file.

Power Automate can do that. This guide shows you a flow that gets the file from Dropbox, uses PDF4me Parse Document to pull the value from inside the PDF, and saves a new file with that value as the name. No code; same content, findable filename.

This guide walks you through the same three parts as the n8n Parse Document rename guide: create a parse template in the PDF4me dashboard, wire up Get file content using path and Parse Document in Power Automate, then Create file so the file is saved with the extracted value as its name. All steps and parameters below are fact-checked from the Power Automate UI in the screenshots.

What You Need Before You Start

  • Power AutomateOpen Power Automate, sign in (Microsoft 365 / Power Platform), and create a new cloud flow (e.g. Automated cloud flow or Instant cloud flow). You'll add one trigger and three actions.
  • PDF4me API keyGet your PDF4me API key (free to start). When you add the Parse Document action, you'll create a connection; the status will show Connected to PDF4me Connect. First time? Follow Connect PDF4me to Power Automate.
  • File storage — This guide uses Dropbox for Get file content using path and Create file so you can follow the screenshots step by step. It's not Dropbox-only: the same flow works with SharePoint, OneDrive, Google Drive, or other connectors. Swap in the equivalent "get file" and "create file" actions for your storage—the logic stays the same.

From scratch: Create the flow → Add Manually trigger a flow (or another trigger) → Add the three actions in order: Get file content using pathParse DocumentCreate file. Configure each step as below. You can keep this guide open in one tab and Power Automate in another—all links to external tools open in new tabs.

The Flow at a Glance

Your Power Automate flow for dynamic file renaming with PDF4me looks like this:

  1. Manually trigger a flow — Use for testing, or an automated trigger (e.g. When a file is created in a folder) so the flow runs whenever a new PDF is available.
  2. Get file content using path (Dropbox) — Gets the PDF from a path (e.g. /blog data/invoice_pdf4me.pdf). Output: the file content (Body) and metadata. You pass the Body to Parse Document and to Create file.
  3. Parse Document (PDF4me) — Extracts the field you need (invoice number, customer name, order number) into parseInfo. Output is JSON only; the file content stays from the previous action. You use the Parse Document output for the new filename.
  4. Create file (Dropbox) — Saves the file to a folder with File Name set to the parsed value (e.g. Pdf4me-202601-32324.pdf) and File Content = Body from Get file content. Same file, new name.

Same file, new name—every time. Below we walk through each part in detail.

Power Automate flow: Manually trigger a flow → Get file content using path → Parse Document → Create file

Step 1: Create the Parse Template and Get the Template Name

First, define what to extract for your file names. A PDF4me parse template tells the API which field to pull from each document—e.g. invoice number, customer name, or order number. You'll use the template's Template Name (or Template ID) in Power Automate in Step 2.

Use the same PDF4me account for both: log in to the dashboard to create the template and use that account when you connect the Parse Document action in Power Automate.

  1. Sign in or create an account at the PDF4me Dashboard (opens in new tab—keep this guide open).
  2. Go to Parse Document (or use the login link with return URL if needed—same link as above).
  3. Create a template: Upload a sample PDF that matches the documents you'll receive. Add keys for each field you want to extract (e.g. Invoice No, customerName, orderNumber) and draw capture areas on the document for each key.
  4. Click Test Parse to see the extracted values, then Save Changes.
  5. Copy the Template Name (e.g. Blog-test) or Template ID from the dashboard—you'll enter it in the Parse Document action in Power Automate in the next step.

For detailed template setup, see Prepare Parse Info for Document (capture areas, regex, multiple keys).

PDF4me Parse Document dashboard: template, Template Name, keys, and parse result

Step 2: Get File Content and Parse Document in Power Automate

Next, get the PDF into the flow and extract the naming value with PDF4me. The file comes from Get file content using path (Dropbox). You'll pass that content to Parse Document and later use the same content for Create file.

Flow so far: Trigger → Get file content using path → Parse Document.

Important: Parse Document returns only JSON (parseInfo with your keys)—it does not pass through the file content. The file content stays from Get file content using path. In Step 3 you'll use Body from Get file content for the new file's content and the Parse Document output for the new file's name.

  1. Add a trigger — Click + New step → add Manually trigger a flow (for testing) or When a file is created (Dropbox) for automation.
  2. Add Get file content using path (Dropbox) — Click + New step → search Dropbox → select Get file content using path.
    • File Path * — Enter the path to your PDF, e.g. /blog data/invoice_pdf4me.pdf. Use the folder icon to browse if needed.
    • Advanced parameters — Open and set Infer Content Type to Yes so Power Automate detects the file type correctly.
    • Ensure you're Connected to Dropbox. Use Change connection reference if you need to switch accounts.
    • The action outputs Body (the file content) and other metadata. You'll pass Body to Parse Document and to Create file.
Power Automate Get file content using path: File Path /blog data/invoice_pdf4me.pdf, Infer Content Type Yes, Connected to Dropbox
  1. Add Parse Document (PDF4me) — Click + New step → search PDF4me → select Parse Document.
    • File Content — Click inside the field, then Add dynamic content → select Body from Get file content using path (the PDF binary).
    • File Name — Enter a name for the document being parsed, e.g. Test.pdf, or use a dynamic value from the trigger if available.
    • Template Name — Enter the Template Name you copied from the dashboard in Step 1 (e.g. Blog-test).
    • Ensure you're Connected to PDF4me Connect. Use Change connection reference to use your PDF4me API key.
    • The action returns body with parseInfo containing your keys (e.g. body.parseInfo['Invoice No']). You'll use this in the Create file step for the filename.
Power Automate Parse Document: File Content from Get file content, File Name Test.pdf, Template Name Blog-test, Connected to PDF4me Connect

Full parameter reference: Parse Document (Power Automate).


Step 3: Create File with the New Name

To save the same file with a new name, the Create file action needs the file content (from Get file content using path) and the filename (from Parse Document). In Power Automate you don't need a separate merge step—you map File Content from the first action and File Name from an expression that uses the Parse Document output.

  1. Add Create file (Dropbox) — Click + New step → search Dropbox → select Create file.

    • Folder Path * — Enter the target folder, e.g. /blog data (or your chosen output folder).
    • File Name * — Use an expression so the name is dynamic. Click the File Name field → click the fx (expression) icon or switch to the Expression tab → paste this formula:
    concat(outputs('Parse_Document')?['body']?['parseInfo']?['Invoice No'], '.pdf')

    Replace Parse_Document with the exact name of your Parse Document action if it's different. Replace 'Invoice No' with your template key (use bracket notation for keys with spaces). The expression appends .pdf so the file keeps the correct extension.

    • File Content * — Click inside the field → Add dynamic content → select Body from Get file content using path (the PDF content). Do not use the output of Parse Document—that returns JSON, not the file.
    • Ensure you're Connected to Dropbox.
Power Automate Create file: Folder Path /blog data, File Name expression concat(Parse_Document parseInfo Invoice No, .pdf), File Content from Get file content

The flow creates a new file with the parsed value as the name and the same content. The original file remains in its location unless you add a separate step to delete or move it.

Gotcha: File Content in Create file must come from Get file content using path (Body). File Name must come from the Parse Document output (e.g. outputs('Parse_Document')?['body']?['parseInfo']?['Invoice No']). If your template key has no space, you can use outputs('Parse_Document')?['body']?['parseInfo']?.invoiceNr (dot notation).


Why This Works

Key points

  • Trigger — Use a manual trigger for testing or an automated trigger (e.g. When a file is created in a folder) so the flow runs whenever a new PDF is available.
  • Get file content using path gives you the PDF (Body). You pass Body to Parse Document (to extract data) and to Create file (as the file content).
  • Parse Document extracts the field you need (invoice number, customer name, order number) into body.parseInfo. It outputs only JSON, not the file.
  • Create file uses Body from Get file content for File Content and an expression like concat(outputs('Parse_Document')?['body']?['parseInfo']?['Invoice No'], '.pdf') for File Name—so each file is renamed dynamically.

Real-World Scenarios

Scenario 1: Vendor Invoice Processing

Problem: A vendor receives dozens of PDF invoices per week from Dropbox, email, or an invoice generator. Files arrive as document.pdf or invoice (1).pdf—hard to find and match to payments.

Solution: Use this flow to rename each file by invoice number (e.g. INV-202601-32324.pdf). Each file is searchable and traceable.

Extract field: Invoice number (or invoice ID) Trigger: Manually for testing, or When a file is created in a folder (Dropbox)

Scenario 2: Purchase Order Documents

Problem: A procurement team gets PO PDFs from suppliers or internal systems. Generic filenames make it difficult to link documents to orders in their ERP.

Solution: Rename each PO PDF by order number (e.g. PO-98765.pdf).

Extract field: PO number Trigger: Dropbox folder, schedule, or file trigger

Scenario 3: Customer Contracts

Problem: A legal or sales team receives signed contracts from various sources. Finding a specific contract by client name or contract ID requires opening files one by one.

Solution: Rename by customer name or contract ID (e.g. Acme-Corp-202601.pdf).

Extract field: Customer name or contract ID Trigger: When a file is created, email, or SharePoint

Scenario 4: Order Confirmations and Shipping Docs

Problem: An operations team receives order confirmations or shipping labels. Matching documents to orders for tracking and audit requires searchable filenames.

Solution: Rename by order number or tracking ID (e.g. ORD-12345.pdf or TRK-ABC123.pdf).

Extract field: Order number or tracking ID Trigger: Dropbox folder, email, or file trigger


Quick FAQ

  • What if I have multiple keys (e.g. invoice number and customer name)? Use them in the expression, e.g. concat(outputs('Parse_Document')?['body']?['parseInfo']?['customerName'], '_', outputs('Parse_Document')?['body']?['parseInfo']?['invoiceNr'], '.pdf').
  • Can I use SharePoint or Google Drive instead of Dropbox? Yes. Use the equivalent actions for your storage (e.g. Get file content and Create file for SharePoint). The flow pattern is the same: get file → Parse Document → create file with parsed value as name.
  • What if the parse template key has a space? Use bracket notation in the expression: outputs('Parse_Document')?['body']?['parseInfo']?['Invoice No']. Keys without spaces can use dot notation: outputs('Parse_Document')?['body']?['parseInfo']?.invoiceNr.

Want to Go Deeper?

ResourceDescription
Connect PDF4me to Power AutomateCreate the PDF4me connection and add your API key
Parse Document — Power AutomateFull action reference: parameters, output, and flow ideas
Rename PDFs by barcode in Power AutomateSame flow pattern but using barcode text instead of parsed fields
Rename files with Parse Document (n8n)Same idea in n8n—download, parse, merge, upload

Next Steps

Recap: Trigger → Get file content using path → Parse Document (PDF4me) → Create file. The Parse template (Step 1) defines the field; Create file uses the Get file content Body for content and the Parse Document output for the filename.

  1. Get your API keyPDF4me API key dashboard (free to start). Use the same account for the dashboard and for the Parse Document connection in Power Automate.
  2. Create your parse template — Define the field(s) you want in the filename (invoice number, customer name, etc.) in the Parse Document dashboard and copy the Template Name.
  3. Build your flow — Trigger → Get file content using path → Parse Document → Create file with dynamic filename expression.
  4. Read the full docsParse Document (Power Automate), Prepare Parse Info.