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 / Populate a Word templa...
Power Automate
Unanswered

Populate a Word template - 400 error opening the selected file

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

My flow but simplified:

PPflow_1-1617914676444.png

Okay first - what is happening here:

'Populate 1' picks a 'Template.docx'

'Create file' creates a file 'MyFile.docx' with 'Populate 1' in SharePoint

 

If 'Create file' was succesful:

'HTTP Post 1' is a Azure Function. It loads 'MyFile.docx' edits it and overwrites 'MyFile.docx' in SharePoint.

 

If 'Create file' was unsuccesful (in this case 'MyFile.docx does already exist):

'HTTP Post 2' does exactly the same thing as 'HTTP Post 1'.

'Populate 2' picks 'MyFile.docx'

'Update file' updates 'MyFile.docx' with 'Populate 2'.

 

If I run this flow twice (first run creates 'MyFile.docx' - second run updates it) 10 times 'Populate 2' will fail and succeed an unpredictable number of time.

 

My error:

"body": {
        "status"400,
        "message""There was an error opening the selected file. Please check the file and try again.\r\nclientRequestId: ****7***-f**6-4**e-****-***653******",
        "error": {
            "message""There was an error opening the selected file. Please check the file and try again."
        },
        "source""wordonlinebusiness-ne.azconn-ne-01.p.azurewebsites.net"
    }
 
What I noticed when this error occurs:
The Content-Length is smaller than it should be.
I can open (or download and open) the file without any problems manually and it is complete.
When opening the file online for the first time, the file looks like this for a split second:
PPflow_2-1617915799770.png
after the split-second (or if 'Populate 2' was successful):
PPflow_3-1617916128381.png

 

 

Now another weird thing: If the flow terminates after 'Create file' and I run it again for the Update-Case 'Populate 2' seems to work without problems so far.

Putting a Delay between 'Create file' and 'HTTP Post 1' won`t change the fact that 'Populate 2' might end in an error.

Categories:
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard