Upload Multiple Local Files to SharePoint Using Modern Activities in UiPath

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 folder to a SharePoint document library using only the Modern Microsoft OneDrive & SharePoint 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 to use
  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 have a stable and production-ready design for uploading multiple local files to SharePoint.

Thanks in advance for your help.

Hi, @arivazhagan_mathivan

Use Microsoft 365 Scope > Use OneDrive & SharePoint > For Each File in Folder > Upload File inside the loop for a reliable upload of multiple local files to SharePoint library.

Add Try Catch for errors; Delay 2s per file to avoid throttling.

File limit: No batch cap, but <100/run ideal; supports 250GB max.

Test small folder first.

Also refer to this video:

Edited

im using UiPath.system.activities version 25.10.3. and this vide showing sharepoint trigger.

@arivazhagan_mathivan

upload files activity - select connection and folder in sharepoint to be uploaded..and for files follow below

cheers


Expression i used : Directory.GetFiles(“in_OutLocalFolder”).Select(Function(x) ILocalResource.FromPath(x))

Error I’m getting
Argument ‘MultipleFilesToUpload’: BC30561: ‘Directory’ is ambiguous, imported from the namespaces or types ‘System.IO, Microsoft.Graph’.

Can you please help on this?

1 Like

@arivazhagan_mathivan

Try this Expression:

System.IO.Directory.GetFiles(“in_OutLocalFolder”).Select(Function(x) ILocalResource.FromPath(x))

Directory is ambiguous between System.IO and Microsoft.Graph.

System.IO.Directory.GetFiles(in_OutLocalFolder).
Select(Function(x) ILocalResource.FromPath(x))

@arivazhagan_mathivan

Before directory write system.IO

and inside in_OutlocalFolder looks like variable..if its a variable then please remove double quotes around it

System.IO.Directory.GetFiles(in_OutLocalFolder).Select(Function(x) ILocalResource.FromPath(x))

this will get all files..if you need to add any filter you can add

cheers