How to create folder in sharepoint (2)


This is a companion to the post in
How to create folder in sharepoint - Help / Studio - UiPath Community Forum
as the staff in this forum seems to be so nice that they have to close almost every thread, no matter if it’s really solved or if there might surface any new information that might be useful to others.

I’ve been struggling for days with this activity. It has several flaws and inconsistencies. To start with, you need to struggle with installing the activity itself:

SharePoint Custom Activities Package - RPA Component | UiPath Marketplace | Overview

On the Marketplace itself, it says it’s been developed “by Internal Labs”, so it looks legit.

But then, when you try to install it from UiPath itself and you search for it, no “Internal Labs” with such a name exists:

There’s this one, appart from a bunch of related ones, but it appears as developed by Radu Bucur and Diana Mincu.

Considering the security issues, installing such a suspicious package wasn’t in my mind.

So I ended up manually installing the previous one, donwloading it from the browser, and then installing it as a local package… just to find out that it was the same!!

Internal Labs staff: could you please be coherent one day and save us from this hassle and potential security holes??

Then, while trying to creat a folder, suddenly I started getting some “” errors, I couldn’t find a reason why. Until, a couple of hours later, I found this topic ( UiPathTeam.SharePoint.Activities.SharePointApplication Scope giving : RemoteException wrapping System.ArgumentOutOfRangeException: Length cannot be less than zero Exception - Help / Activities - UiPath Community Forum)
where they say that it’s a known bug and they are “working of it”.

The bug is as simply as if you finish the root-site URL without a slash (/) it will trigger it, with a misleading error message that has nothing to do with it and will make you crazy trying to find it out.

That post is from two years ago and it seems they haven’t still found 5 minutes to solve it and update the package.

And finally:

The manual ( (absurdly protected to prevent downloads) is unuseful. Trying to simply create a folder inside a Team was a nightmare, and the docs are totally misleading. Look at this:

So my URL looks like

Then you move to the “Documents” sections and there is either > In channels or > In places library. And inside that one there’s the “General” folder, that’s a default one for any Teams group.

You click on it and the URL will look like:

And from this you need to infere what’s the
and the

And then it came a handful of trial and error because the manual is useless. Where they say:

that means that the URL for the library is: /sales/Sales Documents/ (the relative site url is

That’s completely false.

Based on the thread I linked to from great fellow @TUSHAR_DIWASE, I could deduce that:

  • “Library” is NOT surrounded by any pre or post slashes.
  • It seems to be only a single word.
  • It seems to be localized, probably at the time Sharepoint was installed on the server.
  • The localization is not consistent across localization, or it might be changed at the time of set up.

In my case:

  • The “Library” field is “Documentos”.
  • The “Item url” is “General/” (which didn’t exist anywhere in the URL, but clickable on the web) + name of the folder you want to create. Again, with no trailing or ending slashes, either, contrary to what’s stated in the manual:

“So, for the above example, I will get the URL: /sales/Sales Documents/Intro.docx, if I remove
the optional relative site url, I get /Sales Documents/Intro.docx”

And for the SharePointConnection URL in the SharePoint scope I had to use the full site URL as:

By the way, the last part, after site, if you are struggling about how to get the SharePoint url for your Teams group, you can retrieve that part by using

Get-Team -DisplayName “name_of_your_teams_group”

in PowerShell.

Hope it’s of use to somebody in the same situation, as this took me almost two entire days to figure out, all in all.