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 / Enabling 'Optimize for...
Power Automate
Unanswered

Enabling 'Optimize for structured data' broke my for loop

(0) ShareShare
ReportReport
Posted on by 4

I have a workflow that runs perfectly using the Extract Text from PDF for all files in a folder.  I am then parsing the extracted text with RegEx to obtain various strings from my files; however, I am encountering an issue when the page break falls after a table within the file.  Any text on second page returns a single character per line in my extracted file.  I am NOT using Extract Tables from PDF, as I found that unreliable.  My next method was to enable the advanced option of 'Optimize for structured data' but I get an error when I iterate beyond the first file in my folder.  Has anyone else encountered a similar issue iterating through a loop when 'Optimize for structured data' option has been selected?

 

Or, does anyone have any insight into how to navigate the root issue of a page break immediately after a table causing issues?

 

Thanks

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    What's the error that you get?

  • aolson-cimech Profile Picture
    4 on at

    Agnius,

     

    Thank you for taking up this inquiry.  I went back to run it again and share a screenshot of the error and it worked this time.  I have noticed that it is finicky.  For example, I had my Excel instance set to activate the worksheet at index position 1, but that threw an error.  So I updated my code to reflect the worksheet name and that resulted in  a successful flow.  Appreciate the assistance

     

    Update as of 11:27 AM CST - my flow worked beautifully this morning and it iterated through a weekend's worth of PDFs (approximately 15-20).  I now have one more in my queue and it cannot successfully run.  I get a litany of errors that bounce back and forth between setting the active worksheet in Excel to not being able to extract text from PDF.

    Below are the details of the most recent error when it failed to extract from PDF.  On a related note, I seem to have better luck when I have the workflow editor open and I can visually see the steps progress, but that trick is not helping me currently.

     

    aolsoncimech_0-1707154151240.png

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Seems like a bug to me. If you can easily reproduce it with a certain file, I recommend reporting this to MS support.

  • aolson-cimech Profile Picture
    4 on at

    If I am viewing the MS Support page correctly, I can only contact Microsoft directly if I have a premium plan?  What is the best avenue for me to reach out to them if I'm on a Business Standard account?  I also submitted feedback via the hub that I accessed through PAD.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 247 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 164 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 138 Super User 2026 Season 2

Last 30 days Overall leaderboard