How to create folder under documents drive - sharepoint ( office 365 activities)

Hi All,

I want to create a folder under the document drive in SharePoint. please assist.

I’m using office 365 classic activities

eg:
SharePoint URL : https://xyz.com/teams/Testing/
Drive name : " Documents"

If I left the the Query folder as empty, the folders are created to the one drive root folder by default, however I need the folder need to be created in the SharePoint drive

Thanks

Hi @Fresher ,
You can use create folder activity in 365 scope
regards,
LNV

Hi @Fresher,

Use “Create Folder” Activity

image

Hi @neha.upase & @Nguyen_Van_Luong1 ,

Thanks for your reply, however as I mentioned, I’m already using this activity to create a folder

the problem, is I’m unable to create a folder under the documents drive.
its working fine when already a folder is available and we need to create a folder under the available folder

Hi @Fresher ,
Your mean is subfolder?
If you have a folder already in the document library, find it with Find Files and Folders, then use Get File/Folder passing in the existing folder’s ParentReference.Id as input to get the root folder as a DriveItem, then use that in Create Folder to create the new folder you want under the root.
regards,
LNV

Demo test is my sharepoint page ( its a fresh page with no folders and file)
Drive name : Documents

here I want to create an folder with the name of “xyz”

You can specify the “Drive Name” in “Find Files and Folders” activity.

Use the result as “Destination folder” in “Create Folder” activity.

Hi @efelantti ,

yes, Tried with drive name as “Documents” still the folders are not created.
If you are able to create a folder, could you please share the sample code.

I tested this, and as it turns out, it wasn’t possible to create a folder directly under “Documents” with the instructions I provided. I managed to create it by using “Get File/Folder” and providing the url to the Documents drive like this
image
(start of url omitted).

2 Likes

Thank you @efelantti

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.