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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / "Populate a Microsoft ...
Power Automate
Unanswered

"Populate a Microsoft Word Template" generating a .docx file with undreadable content

(0) ShareShare
ReportReport
Posted on by 21

I have a flow which takes answers from a Microsoft Form and uses them to populate a template. The template is saved as a .docx. The flow runs successfully but sends a word document as an attachment that produces the following error:

 

amcneil15_0-1715884654164.png

 

If I click yes, I get this:

amcneil15_1-1715884682587.png

 

Here is my Flow:

 

amcneil15_2-1715884728457.png

amcneil15_4-1715884827935.png

 

amcneil15_3-1715884796335.png

 

 

Categories:
I have the same question (0)
  • AlexEncodian Profile Picture
    4,409 Moderator on at

    @amcneil15 

     

    Try adding a file extension to the name field in attachments form of send email action.

  • Ntulikid Profile Picture
    29 on at

    Hi 

     

    Try to switch Power Automate to classic mode, this is achieved by toggling the switch on the top right, on the right side of new designer see if it will work.

     

    If it doesn't work, add a create file connector after populate word template, then use get file content using path and then use the file content dynamic control from the get file content using path connector on the attachment content

  • AM-19081617-0 Profile Picture
    21 on at

    Thanks for the reply. I tried both of these solutions with no luck. In fact, I added a create file to a sharepoint site action and it creates the file and saves it perfectly, and I can open it from the sharepoint site. However, the when I add that file content to an email attachment action, it will not open from the email.

  • AM-19081617-0 Profile Picture
    21 on at

    Update: I can create and save a new file from the file content of the 'Populate a Microsoft Word Template" action. However, when I add that file content to the attachments section of the 'send an email' action, the file will not open.

  • Verified answer
    AM-19081617-0 Profile Picture
    21 on at

    For this to finally work. I had to add a variable control that I named "attachments array" with this schema:

    {
    "Name": (Pass File Name Here)
    "ContentBytes": (Pass file contents here)
    }

     

    Then passed that array in the attachments section of the email control.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard