Uploading Folders to Sharepoint

Hi there, I am unable to upload folders I have download today to the Sharepoint. I am not sure if my looping is incorrect or UiPath is not allowed to access the Sharepoint. Can someone please assist?

Image below is in a for loop

image

Hi @hirz
Welcome to the UiPath Community!

The https://docs.uipath.com/activities/docs/copy-folder-x activity belongs to UiPath.System.Activities which generally contains activities that work at System level, i.e. File IO (Input/Output), File/Folder Operations, Write Text Files, etc.

If you want to move/copy a file to SharePoint, you need to use activities designed with that purpose. Essentially, since SharePoint is an online location, you would need to Upload a file/folder there, not Copy/Move.

You may use one of the following:

  1. SharePoint Customer Activities Pack
  2. Microsoft Office 365 Activities Pack

For option #2 above, you will need to do some explicit setup, but it will help if you are planning more than just SharePoint upload, e.g. Email management, Excel, OneDrive, SharePoint lists, etc.

I hope this clarifies the doubt.

Hi @RPAForEveryone ,

Thank you for the advice. I have already tried using that method and it does not work.

Is it possible that the reason why it is not uploaded is because of the restricted access that I have for Sharepoint since this is not a personal account?

If you are able to manually upload files/folders to the SharePoint site, then it should work with the activity too.
Maybe if you could share the error message from that activity, preferably with screenshots, the community can help you. :slight_smile:

HI @hirz
Have you checked on this thread?

Regards
Gokul

Apparently, there is no error message.

I have put this in Sharepoint Application Scope > For Each Folder in Folder > If

image

If there is no error message, does your workflow complete successfully?
In that case, are you able to verify if the file/folder got uploaded to SharePoint?

My other workflow is done correctly but i am stuck at this part. I want to upload the files i have downloaded i have today and upload it to the sharepoint. Which is why the loop to see the thru in the download folder and if the download folder is modified today, upload it to sharepoint.

Hi @hirz
I suspect this is due to the wrong activity being used for folder creation.
According to the SharePoint Custom Activities package page, there are two separate activities for files and folders:
image

Try using Create Folder for each folder and then Upload File for files in each folder.


image

Hi @RPAForEveryone ,

As shown in the picture, I have put it in the open application and used CreateFolder yet it does not work. Could it be because UiPath is not allowed to access Sharepoint?

Yes, not having access to SharePoint could certainly cause issues.
Can you please share the error message?

There is no error message for this, however, the looping was not gone thru

Hi have you use the test connection button?
and are you sure the user youre using to acccess sharepoint have the authorization to write / edit the folder?

Hi, I did test connection button. Im pretty sure that the reason to why folders cannot be uploaded is because of the granting for using UiPath

if you can manually open/edit the folder using you account , then uipath should have no problem accessing it using your account

Hi, i have tried to do it locally in my laptop but still not working. Is my IF not done correctly?

image
image