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 / Copilot Studio / Cannot Extract Text to...
Copilot Studio
Suggested Answer

Cannot Extract Text to Word file

(0) ShareShare
ReportReport
Posted on by 2

Dear Microsoft,

I am currently developing a Copilot Studio to extract data from a file, convert it into text, and then populate the text using the document placeholders function.

  1. During individual testing, the process works successfully: data is extracted from a file to text, and the text is correctly populated into the Word file via document placeholders. The model response is generated as expected.

  2. However, when running a full flow test, the output documents in Word does not function properly. It continually retries without displaying the final outcome.

Could you please advise what might be wrong with the settings?

 
 
Screenshot 2026-01-26 133023.png
Screenshot 2026-01-26 141147.png
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    What I see is a text string being passed in, not a proper file, you can see it's just escaped JSON which is just a bland string, don't you want to pass in the file itself?
     
    I guess I am thrown off by 2 prompts in a row, but your picture shows the words File, but you are not passing in a file. its just a string.
  • JO-26010535-0 Profile Picture
    2 on at
    Hi Michael,
     
    My apologies for the confusion.
     
    For the Extract File Data and Convert it to Text, I have uploaded using the PDF format and it is successfully to extract the data to Text. 
     
     
    However, when the process moves forward to run a prompt of "Converting Text to Word." It doesn't work and keeps retrying. Please find the correct prompt format and the process flow below.
     
     
     
    Look forward to your advise.
     
    Thank you!
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    What I see happening, and I have a question either way, is that right now you are passing in a giant string, which is what I was saying. After passing in just a giant text string you are asking the Prompt to "figure out" the value that exists in the file.
     
    It's smart, its not that level smart to be consistent. What you want to do is pass in a structure JSON so that it can stop trying to "find and infer" but it will absolutely have the structure it needs to do the mapping. The left side is causing the issue
     
    Now, why does it work for you when you test? This is normal as well. Umm Michael that sounds ridiculous. Yeah, well so does saying my real full name in French but my mother still does it lol
     
    My "assumption" is that when you are in test your testing is not using the same level of document output (meaning its bigger / most details whatever) in the real-world PDFs. The bigger the text string becomes the more change it will fail.
     
    So for your first prompt, please change it to be a structured json and NOT a text string output. Right now you are using the correct 1st prompt, but you are not creating structured output a text string is not structured, Change it to be JSON (structured) and use that.
     

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey

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 > Copilot Studio

#1
Valantis Profile Picture

Valantis 277

#2
11manish Profile Picture

11manish 206

#3
sannavajjala87 Profile Picture

sannavajjala87 156 Super User 2026 Season 1

Last 30 days Overall leaderboard