logo
search
SharePoint Document Issues

How to Extract PDF Text and Rename Files with Power Automate

Partner EditorPartner Editor Sep 28, 2026 869 views

Question details

The user needs to extract specific text, such as a team name, from a PDF form and use that extracted text to automatically rename the file or move it into a corresponding SharePoint folder.

How to Extract PDF Text and Rename Files with Power Automate
Product
Power Automate
Device & OS
not provided
Scenario
Automating SharePoint document organization by pulling dynamic metadata (like team names) directly from uploaded PDF forms.
Observed behavior
Files currently require manual renaming or routing because folder names do not always strictly match the text provided inside the PDF forms.
Before you start

Ensure you have an active Microsoft Power Automate license with available AI Builder credits, as extracting text from PDFs requires premium AI Builder actions.

Solution 1Recommended

Use AI Builder to Extract Text and Organize Files

This solution uses the AI Builder connector in Power Automate to read PDF text, convert it to a string, and dynamically rename or move the file in SharePoint.

Because the team names inside the PDFs might not perfectly match the SharePoint folder names (e.g., 'Arizona Blue' vs. 'Arizona Baseball Blue'), you may need to add condition mapping or simply append the extracted text to the file name instead of relying on exact folder matches.

1
Get the PDF file identifier

In your Power Automate flow, use the SharePoint 'Get file metadata' or trigger action to retrieve the unique identifier of the uploaded PDF.

2
Retrieve file content

Add the SharePoint 'Get file content' action and pass the file identifier to fetch the actual PDF data.

3
Extract text with AI Builder

Add the AI Builder action 'Recognize text in an image or a PDF document'. Pass the file content from the previous step into this action.

4
Convert text array to string

AI Builder returns an array of text lines. Use a 'join' expression in a 'Compose' action to convert the returned text array into a single, workable string.

5
Rename or move the file

Add a 'Move file' or 'Update file properties' action. Use the extracted string (the team name) as a dynamic value to rename the file or define the destination SharePoint folder path.

Use AI Builder to Extract Text and Organize Files
AI Builder Requirements: The 'Recognize text' action is a premium feature. Your Power Platform environment must have adequate AI Builder credits allocated to run this flow successfully.
Free Microsoft Office alternative

Looking for an easier way to manage PDFs and Office files?

While Power Automate handles complex automated SharePoint routing, WPS Office offers a robust, free alternative for daily document and PDF management. It is lightweight, fully compatible with Microsoft formats, and provides an intuitive interface for all your editing needs.

Free and lightweight Office suite for everyday tasksFully compatible with Microsoft Word, Excel, PowerPoint, and SharePoint filesBuilt-in PDF editor for manual text extraction, conversion, and quick editsFamiliar user interface ensuring seamless migration and zero learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why do I need AI Builder credits to extract PDF text in Power Automate?

Extracting unstructured text from an image or PDF requires Optical Character Recognition (OCR) and machine learning capabilities. In Power Automate, these advanced features are provided by AI Builder, which is a premium connector requiring specific licensing credits.

How can I handle mismatched folder names in my Power Automate flow?

If the extracted text (like 'Arizona Blue') doesn't exactly match the SharePoint folder ('Arizona Baseball Blue'), you can use a 'Switch' or 'Condition' control in your flow to map specific extracted values to the correct folder path, or simply append the extracted text to the file name instead of moving it.

How do I convert the AI Builder text array into a readable string?

AI Builder returns extracted text as an array of individual lines. You can convert this into a single string by using the join() expression in a Power Automate Compose action, for example joining the results with a space character.