Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Search specific text on a PDF and get the page number it exists

Hi, I'm a beginner user of Power Automate.

I have around 10 page PDF (ex. page 1 to 10), and I would like to get the page number where the specific text (ex. SS-4) exists, and extract the one page PDF. The problem is the existing page is different for each PDF. Thus, I'm trying to use AI Builder, Power Automate, and Encodian to solve this.


First, I use AI Builder's "Recognise text in an image or a PDF document" and get the all context. Next, I add "Compose" and type the expression which orders search the specific text "ex. A" and get the page number. However I'm not sure what kind of expression I should use.

The text A is the unique text and should be only 1 page out of 10.

Appreciate if you can help me Thanks!


Memo, Because I use Mac, I can't access to Power Automate Desktop.

Power Apps
Power Apps

Hi Tomo,


Here is one way you could do it. After extracting PDF contents with the "Recognize text in an image or a PDF document" action, iterate on "results" and "lines" to find a "text" item which matches your criteria. If it matches, execute the relevant action within that condition block.


This is what it looks like in the Flow editor:



And here's an example run with a match:



Is this what you were looking for? (there might be ways to do this without the double "Apply to each" blocks ... if anyone has the info I'm keen to learn :))



Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Top Solution Authors
Users online (3,629)