The SharePoint connector has an action ‘Create new folder’ that will give an error when the target document library has a dot at the end of its name.
There’s an alternative way to create a new folder that uses the path of the document library instead of its name.
When creating a document library I follow the best practice of creating it with a short unique name (like account number) that will be used as path, and then rename it with for example the name of a Dynamics 365 account record.
![](https://i0.wp.com/2die4it.com/wp-content/uploads/2020/04/Document-Library-Settings.png?resize=810%2C181&ssl=1)
When I want to provision some folders to the document library I would obviously pick the dedicated action ‘Create new folder’ but it will give an error when the name of the document library has a dot at its end.
Let me show you with a test flow.
![](https://i0.wp.com/2die4it.com/wp-content/uploads/2020/04/Create-folder-1.png?resize=771%2C610&ssl=1)
![](https://i0.wp.com/2die4it.com/wp-content/uploads/2020/04/CreateFolderAction.png?resize=766%2C288&ssl=1)
The dedicated action ‘Create new folder’ will give an error.
![](https://i2.wp.com/2die4it.com/wp-content/uploads/2020/04/CreateFolderActionError.png?fit=810%2C272&ssl=1)
So I looked for an alternative way to create a folder in a document library with the action ‘Send an HTTP request to SharePoint’.
Reference: Working with folders and files with REST
![](https://i0.wp.com/2die4it.com/wp-content/uploads/2020/04/Create-folder-0.png?resize=765%2C470&ssl=1)
This action is using the path of the document library and will create the folder successfully.
![](https://i0.wp.com/2die4it.com/wp-content/uploads/2020/04/CreateFolderActionSuccess.png?resize=764%2C719&ssl=1)
If you want to create new folder and add a file, you’re able to this in one action ‘Create file’ based on the folder path. If the folder doesn’t exist it will be created.
![](https://i0.wp.com/2die4it.com/wp-content/uploads/2020/04/AddFoldersFile.png?resize=763%2C379&ssl=1)
One comment