There’s no single native “copy folder with all subfolders from OneDrive to SharePoint” action, so the loop approach is correct, but the paths must be built carefully.
For each OneDrive item, use its Folder path e.g., /root:/Parent/Sub1/File.txt: and strip the leading part, then append that relative path to the SharePoint library path when creating folders/files.
When creating folders in SharePoint, ensure the path does not start with a / and that each parent folder exists before creating a child e.g., Library/Sub1/Sub).
To avoid long runs, process only new/changed files trigger “When a file is created or modified” in OneDrive, or batch the job by top‑level subfolder instead of copying everything in one flow
If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
Regards,
Riyaz