Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

SharePoint "Create file" fails if content is from MS Office file. All other files work fine

(0) ShareShare
ReportReport
Posted on by

I have a flow that needs to take a document from one library and copy it to another. The file name needs to change as well, so I don't believe I can use the "copy file" function. Instead I use the "Get file contents" function followed by the "Create file" function as shown below:

Steps to copy file with new filename.Steps to copy file with new filename.

This works fine for most files. However, if I try it with a MS Word or Excel file, the Flow gets stuck on this step. Weirdly, the file is in fact fully copied over (with the contents and everything) but the Flow stays on this step until it times out with the error below:

ApplicationFrameHost_RpL5MriY1b.png

 

The file size is very small (<50kb) so it's not due to that. It almost feels like the flow is not getting the correct response when creating the file and it keeps trying over and over again until it fails.

 

Thanks in advance for any help anyone can provide.

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: SharePoint "Create file" fails if content is from MS Office file. All other files work fine

    Just in case anyone runs into this issues in the future, I was able to resolve it:
    1. Our administrator thinks the issue may be caused by having the SharePoint linked to a private Teams Channel.

     

    2. I did not use the method I originally outlined (Get File Contents > Create File). Instead I renamed the file first, then used the "Move file" command.

     

    3. Renaming the file is not currently a function provided in Flow, hence why I tried  the Get File Contents > Create File thing at first. But you can rename a file if you use the Send an HTTP Request command

    SeaRams_0-1594054494375.png

     

  • Community Power Platform Member Profile Picture
    on at
    Re: SharePoint "Create file" fails if content is from MS Office file. All other files work fine

    Thanks for your reply. I just tried it again with a blank document and the same thing happened. A screenshot is below; it's still hasn't finished running but it'll take another 15 minutes or so to time-out.

     

    Below are links to the text in "File content" for each step. It seems like a lot of data for a blank document.

    Get file content - File contents

    https://pastebin.com/jCQVp5Zf

    Create file - File contents

    https://pastebin.com/T2MuStuG

     

    chrome_hTwxR1IqwC.png

     

  • mcin9781 Profile Picture
    on at
    Re: SharePoint "Create file" fails if content is from MS Office file. All other files work fine

    You may want to try to view the File Content that is being passed from the previous step.  I did not see this in the original post, but there could possibly be something in the content itself that is blocking the creation of the file. 

     

    You could also try your same method with a Word document that has no contents and see if that is accepted.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,594 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow