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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unable to extract data...
Power Automate
Answered

Unable to extract data from pdf

(0) ShareShare
ReportReport
Posted on by 34

Hi All ,  I have pdf file with multiple pages. Inside the foreach Loop, I am using Extract text from PDF action and all the text value are saved in ExtractedPdfText variable. I would like to extract the invoice name from the pdf file. But for each and every pdf page the variable index value differs for the invoice name. So the output is coming wrong. But all the pdf pages looks like structured one.

 

    By using Extract pdf file pages to new pdf file action, i need to save each file with the invoice name. But it is saving the file with the wrong name because of index value changes for each page. Can you please guide me how i can extract the invoice name correctly?

Thanks in advance!

I have the same question (0)
  • Verified answer
    UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    Use regex and put that pattern in the parse text activity....

    Please send me one sample data so that I  will give full clarification

     

    Hope thi helps 

    Usha 

  • Th11 Profile Picture
    on at

    I am also running into this kind of similar issue

  • AT88 Profile Picture
    34 on at

    Hi Usha,

    Thank you so much for your response. Eg: In the pdf file, filename will be like this File Name: 20231211-1

    PDF file has multiple pages. The PAD has to extract this value from all the pdf pages and using the Extract pdf file pages to new pdf file action, it has to save the new file with the appropriate filename. But for some reason in the variable index it is taking the date value (1/5/2024) and it is giving the wrong output. please guide me.

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Use Parse text on the %ExtractedPDFText% value, with the "Is regular expression" toggle enabled, and write a regex pattern to find the value. You could use (?<=File Name:\s)[\d-]+ as the regex. And then the %Match% variable will return the file name.

    Agnius_0-1704522308507.png

     

    If a single file can contain more than one file name, disable the "First occurrence only" toggle, and you'll get all the matches in a list stored in %Matches%:

    Agnius_1-1704522377915.png

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 378

#2
Valantis Profile Picture

Valantis 329

#3
David_MA Profile Picture

David_MA 283 Super User 2026 Season 1

Last 30 days Overall leaderboard