I need to copy files along with folders from SharePoint 201 to online. For this, created a on-premises data gateway connection. Used "Get files (properties only)" action in power automate (with the connection of on-premise SharePoint site. Site address and library are given). Then used "Apply to each" action to loop through files and folders. In this action "items('Apply_to_each')?['{Path}']" is empty. Hence unable to get the file content and create file under the folder path. Need to maintain the folder structure.

Suggestions please!

1 Answer 1


Consider using the SharePoint Migration Tool instead. This tool is designed for migrating content from on-premises SharePoint to SharePoint Online and may be better suited to your requirements.

Overview of the SharePoint Migration Tool (SPMT)

  • Thankyou for the reply. This have some limitations and did not migrate all files.
    – user109360
    Commented Aug 21, 2023 at 15:30
  • Which limitations? what type of files? Using proper migration software is the best practice for moving content from on-premises SharePoint to SharePoint Online. Commented Aug 21, 2023 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.