web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : IhcMI9iac0U6y3w2u+tGA2
Power Automate - Building Flows
Answered

Comparing content of 2 pdfs

Like (0) ShareShare
ReportReport
Posted on 23 Jun 2023 15:15:12 by

Hi guys,

 

I have two folders in sharepoint that contain numerous pdfs. I need a flow that could compare the pdfs in these two folders using their texts.

 

I need to be able to set a condition that states: if the number of times [text] exists in file 1 =/= the number of times [text] exists in file 2, place both pdfs into a new folder. I also would like to add this condition multiple times, as there are several [text]s that need to be compared in these files.

 

If [text] in doc 1 is = to [text] in doc 2, I need it to move on to the next document in the two folders.

 

[text] is basically just a few letters written together, like "LO."

 

Ive attached how my flow looks like so far.

 

Please let me know how to go about setting this condition?
Thank you!

  • Verified answer
    Matthy79 Profile Picture
    4,178 Super User 2024 Season 1 on 03 Oct 2023 at 08:58:20
    Re: Comparing content of 2 pdfs

    Hello @Anonymous

     

    This is how it should work:

     

    Matthy79_0-1696323375657.png

     

    I skipped the AI part but this is a good formula to get the text using only one compose:

     

    join(xpath(xml(json(concat('{ "root": { "results": ', outputs('Recognize_text_in_an_image_or_a_PDF_document')?['body/responsev2/predictionOutput/results'], ' } }'))), 'root/results/lines/text/text()'), ' ')

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete