To extract text from a PDF using Power Automate, you can use the “Microsoft Power Automate PDF Connector” along with the Power automate Convert PDF to Text action for normal PDF.But for scanned PDF  or OCR PDF in power automate  you have to make flow in cloud flow here’s a simple guide to achieve this:

Steps for Power automate Convert PDF to Text:

  1. Start by creating a new flow in Power Automate.
  2. Manually Trigger a file or You can choose a trigger for your flow, such as “When a file is created (SharePoint)” if your PDF file is stored in SharePoint, or “When a file is created (OneDrive)” if it’s stored in OneDrive.
  3. Add an action and Serach for “Get file content Using Path”. and provide path of file in parameters section.
  4. Add another action “Recognize text in an image or a PDF document” and provide “filecontent” as parameter.
  5. Initialize variable and input Name “text”, type string.
  6. For each 1 “body/response” for each “lines” “Append to string variable” input “text”
  7. Then “Create File” action and Input Path,File name and text as file content.
  8. Save and test your flow to ensure that the text extraction from the PDF is working as expected.
Microsoft power automate convert pdf to text
1.Power Automate Extract Text From PDF

This approach allows you to automate the extraction of text from PDF files using Power Automate.Your file is converted into text.

Flow to Convert PDF to Text file in folder:

Above flow will only convert one PDF  file to text .If we have hundreds of PDF file to which we want to convert PDF to text to begin with:

  1. We need to list all files in folder for this we will use “List files in folder” action and provide path of folder where all files exist.
  2. Initialise variable action.
  3. Inside for loop Get file content using path action.
  4. Recognise text in a image or a PDF document connector is used.
  5. Then again inside loop Append to string variable.
  6. Create file connectors is used.
  7. Set variable value to Zero.
how to convert list of files in folder to text
2.Power automate convert PDF to Text

By SC

Leave a Reply

Your email address will not be published. Required fields are marked *