Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

404 Not Found when Moving Sharepoint Folders, yet Files Successfully Moved

(0) ShareShare
ReportReport
Posted on by 13

Hi guys, I'm having trouble with a 'move file' action on my power automate flow. In general this works fine but it seems to confuse itself when subfolders are involved.

My flow first gets gets all the info for files in a particular SharePoint folder, parses, then applies a move to each file found - so I can move all contents from this folder to a different SharePoint location. I have tested this and it works fine.

But in the last flow the contents contained a subfolder which contained 4 files itself and this I think was the root of the error. Even though all contents (files, subfolder, and subfolder files) were all successfully moved as intended, I got a 404 error which halted further actions from being successful.

My interpretation is that the order it looked to move files confused it, seeing the now empty subfolder and causing the error? Either way, looking for a way to update so the flow knows its successful and moves ahead.

The relevant section of the flow, error, and error output screenshots are attached.
TIA!!

  • mmaretti Profile Picture
    13 on at
    Re: 404 Not Found when Moving Sharepoint Folders, yet Files Successfully Moved

    The FolderArray is set/appended based on the ID in the Parse Json action. The IDs are strings. Here's an example 

    mmaretti_0-1699564365737.png

     

  • Spinner Profile Picture
    89 on at
    Re: 404 Not Found when Moving Sharepoint Folders, yet Files Successfully Moved

    Thanks for the tip @mmaretti . Unfortunately my flow doesn't contain any direct reference to the Id value. Does your FolderArray variable consist of a set of file identifiers? Are these integers or strings, and if the latter, would you be able to provide an example, please?

  • Verified answer
    mmaretti Profile Picture
    13 on at
    Re: 404 Not Found when Moving Sharepoint Folders, yet Files Successfully Moved

    Under my "append to array variable" I had the Id value written incorrectly.

    I updated the expression to: body('Parse_JSON')?['Id'}
    I believe this rectified the issue. Let me know if it helps you

  • Spinner Profile Picture
    89 on at
    Re: 404 Not Found when Moving Sharepoint Folders, yet Files Successfully Moved

    I'm having the same issue. It's quite bizarre and means the flow can't be used with confidence, as one can't tell at a glance whether the move operation has succeeded or not.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >