What's the SharePoint document library in SharePoint Create Folder activity from Office 365 package?

I’m trying to create a Folder in a SharePoint site belonging to a Microsoft Teams team.

I can create the folder if I specify the “SharePoint site address”, but it gets created in the “Documents” root folder.

Every team in Teams has a default “Library site” or “Channel” that is called “General”, and I want my folder to be created inside it, but I always experience the former.

I’ve been trying combinations for the last few days and I almost pulled all my hair trying to figure out. As usual, documentation is, to say the least, incomplete, unusable or plainly mediocre. According to:
Activities - Create Folder (uipath.com)

SharePoint document library - The document library within the indicated SharePoint site that contains the file or folder. Open your SharePoint site in a browser, go to the Documents tab, then retrieve the URL, e.g., https://yourCompany.sharepoint.com/sites/Marketing/Shared%20Documents/Forms/AllItems.aspx. This property supports String variables and string formatted values.

“Go to the Documents tab, then retrieve the URL”. But is it THAT? I mean… The whole URL? Again, lack of examples makes this unusable. All I get with the whole URL is a "Create Folder:

You do not have access to any Drives named ‘https://xxxxxxxxxxxxxxxxxxxxxxxxx.com/sites/TestSite/Shared%20documents/Forms/AllItems.aspx’ inside SharePoint site ‘https://xxxxxxxxxxxxxxxxxxxxxxxxx.com/sites/TestSite’.

I’m almost sure the whole URL is not the format it’s expecting, neither the “.aspx” part; it wouldn’t make sense to enter the SharePoint site address first, then replicate it plus a “/Shared%20documents/Forms/AllItems.aspx” part for the “document library”.

@pere

the library name …generally it is by default shared documents or documents…if you create an other document library you can use that…to find the exact name go to site settings and see the library name there…you just need to give the name there

an example

cheers

@Anil_G , I appreciate your reply.

The problem is that “generally” is by default “shared documents” or “documents”… add to that that sometimes it’s localized, we have two official languages here so you are adding 4 extra combinations… add to that that sometimes it works with final “/”, sometimes without… and sometimes, after you’ve tried all those combinations, it still doesn’t work.

In my case I spent like 3 days traying all combinations I’ve been able to. Sometimes it works up to some deepness in the directory tree; then I try the last one and it says I have no permissions (a different error than the “doesn’t exist” one). Even if exposed the right API permissions, both for Graph and for SharePoint. Even if I’ve tried the Office 365 activites / classic or not, and even a mixture of them (something I’ll explain one day in another post and I’m not sure if even UiPath it’s aware of such “mixture” is possible). Sometimes Classic activity allows certain operations and denies others, sometimes the non-classic allows others but denies the former, all that with the same permissions in Azure, so it shows a lot of inconsistence, trial&error and a lot of possible cominations in the activity, which, with lack of proper documentation, becomes unmanageable to accomplish very simple tasks.

The summarize:

This is the farthest I can go with the Create Folder (UiPath.MicrosoftOffice365.Activities.Files.CreateFolderConnections) activity. With this configuration of the activity, and that path: the main https://sharepointsite.com/nameOSite/Documentos%20Compartidos" path. I can create folders there.

The problem is that Teams creats a “General” default “channel” or whatever it is (there’s so much confusing stuff I don’t bother anymore if it’s a channel, a list, a group or whatever) for every team and then that’s the name of the dafault document folder for it, which is inside “Documents”, which translates to “Shared%20Documents” or “Documentos%20Compartidos” (depending on your locale) for accessing it through the activity. I need subfolders created inside “Shared%20Documents/General”, but then it throws an error about not having permissions.

Compare this to the “Sharepoint application scope” (UiPathTeam.SharePoint.Activities.SharepointApplicationScope) plus “Create Folder” (UiPathTeam.SharePoint.Activities.Libraries.CreateFolder) in windows-LEGACY projects. I already had it working; it already took me days of investigation to make it work.
There was enought with merely using “Documentos” for “Librayr Name” and “General/” + name of the folder to create and it worked straightforward. I didn’t even have to set up or expuse any API settings in Azure whatsoever; the scope activity allowed me to authenticate merely by user+password, which I could store in a Credentials asset:

Captura de pantalla 2024-03-08 100426

Isn’t this a step forward? Merely for converting projects from Legacy to Windows. Redo all the work done and still don’t get it working.

Look at the vast amounts of permissions I’ve conceded for this tenant/application ID/secret ID:

Even though the Microsoft 365 Scope says (via “auto-detect”) the only Authentication Scope it’s supposed to need is “Sites.ReadWrite.All”.

Yet the only combination that works is “https://nameofshrepointserver.com/site/siteid/Documentos Compartidos”