Hi Team,
I have already successfully established the connection to SharePoint using the SharePoint URL in UiPath, and authentication is working fine.
Now I need to upload multiple files from a local Desktop folder to a SharePoint Site Folders using only the Modern Microsoft OneDrive & SharePoint [activities].(or Suggest Any other way to upload by UI Path) (Activities).
Could someone please provide a clear, step-by-step workflow for this requirement using the Modern activities?
Specifically, I am looking for:
The correct [activities]
The exact arguments / properties to be passed
The proper way to handle multiple files
Any known limitations or best practices with Modern [activities] for this scenario
My goal is to upload the Local Desktop Files to the Sharepoint Site Folder .
You can follow this approach. Get all the files from local folders through For Each File in Folder activity and upload the files to SharePoint/OneDrive using the connection you’ve created.
Assign Activity contains (lst_Files is of type List(IResource)): lst_Files = New List(Of IResource) From {LocalResource.FromPath(CurrentFile.FullName)}
Yes, you can do this using the Modern Microsoft OneDrive & SharePoint activities without UI automation.
Since you already have the SharePoint connection working, you can use For Each File in Folder to get all the files from your local Desktop folder. Inside the loop, use the Upload File activity and provide the current file and your target SharePoint folder.
The workflow would be something like:
Use Microsoft OneDrive & SharePoint → For Each File in Folder → Upload File
You can also add Try Catch or retry logic in case any individual file fails to upload.
I think this should work well for multiple files. Let us know if you face any issue while configuring the Upload File activity.
As we discussed over call, try to configure the Microsoft 365 Scope activity and use Upload Files activity within the scope to fix the issue.
Basically, you can upload the files into your personal SharePoint/OneDrive using your personal account, however using the above approach you will be able to upload files into a different/client’s SharePoint.
Let me know when you fix this issue and mark this as resolved once fixed.