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.
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.
The dedicated action ‘Create new folder’ will give an error.
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
This action is using the path of the document library and will create the folder successfully.
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.
One comment