Local Desktop files upload to Sharepoint

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:

  1. The correct [activities]
  2. The exact arguments / properties to be passed
  3. The proper way to handle multiple files
  4. 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 .

Hi @Abhijeet_Daundkar

You can use Microsoft OneDrive & SharePoint → Upload File inside the For Each File in Folder activity.

Basic flow:

For Each File in Folder (Desktop folder)
→ Upload File

In Upload File, select your SharePoint connection, Site, destination Folder, and pass the current file as the file input.

This will loop through all files in the local folder and upload them to the selected SharePoint folder.

If you need to preserve the folder structure, you can additionally create the required SharePoint folders before uploading.

I tried the Option you give , but still it not accepting the Arguments , can you have a teams meeting to discuss on this issue ?

Hi @Abhijeet_Daundkar,

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)}

I hope this helps.

Cheers!

Hi @Abhijeet_Daundkar,

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.

While using Last Upload File Activity , I am getting below error message , can you please guide me on this .

Hello Prashant,

After adding the Arguments , still my issue couldent solve.

Hi @Abhijeet_Daundkar,

It looks like you haven’t created the lst_Files variable at all. Create that first and then it should work.

lst_Files variable should be of Type List(IResource).

Cheers!

Hello Prashanth,

Can you guide me how to create a Variable as I am new to UiPath.

Hi @Abhijeet_Daundkar,

Use this attached workflow to upload files to SharePoint. Just ensure you add all your configurations.
SP_UploadFilesToSharePoint.xaml (24.4 KB)

Also, since you are new to UiPath, I would recommend you complete this training to learn basics before working with complex workflows.

Cheers!

Hello Prashant,

If you are available today , can we make a short teams call to check my configuration .

I will be available today in below time slot , Please let us know your availability so me discuss on the teams meeting.

Available Time:-

11:30Am to 1:00 PM

1:30 PM to 2:00 PM

3:30 Pm to 4:00 PM

Hello Prashanth,

Can you please let me know when we can connect today , Please share your personal email address so I can send the teams invitation.

Hi @Abhijeet_Daundkar,

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.

Cheers!

@Abhijeet_Daundkar You can use OneDrive activities to upload files on SharePoint.

Use For each file in folder activity and inside this loop use Upload file to SharePoint activity.

For files details use this syntax

New List(Of IResource) From {LocalResource.FromPath(CurrentFile.FullName)}

You need to pass the Destination Folder also, so instead of OneDrive just click on the + icon and select Enter URL.

And copy the complete URl of that folder and pass here in string format.

Thanks