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 / Text only extract from...
Power Automate
Answered

Text only extract from PDFs at the end of the flow

(0) ShareShare
ReportReport
Posted on by 5

I'm trying to rename PDFs based on their content (like here), but when the flow gets to set the variable, the extracted text simply isn't there.
And when I remove "set variable", then the text gets extract from the PDFs

 

(print is in br-portuguese, sorry)

MorgHeEx_0-1689906120224.png

 

 

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @MorgHeEx 

     

    So you are saying Line variable is empty ?

     

  • MorgHeEx Profile Picture
    5 on at

    Text don't get extracted, thus no "ExtractedPDFText" variable, so no Line variable.

    However, if I remove the "Set Variable" action, the text get extracted at the end of the flow.

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

    Since this is a For each loop, it sounds like some of the files you retrieve can be scanned or protected from extracting data, and thus PAD does not extract anything. It then fails on the Set variable action. But when you remove it, it continues even if it extracts nothing from a single file, but then it finds some text in the next file.

     

    I suggest you add a If condition to check if %TextList% is empty and then add a Next loop action to inside the condition like this:

    Agnius_0-1689910513137.png

    This will skip the files where nothing is extracted and then the flow won't fail.

    You might also maybe want to add a Display message box action before doing Next loop to give yourself a pop-up message for each file where nothing is extracted, so that you can check the faulty files and figure out why they're like that.

    -------------------------------------------------------------------------
    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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 315 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 267

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard