I this working macro I'm making CERTAIN I create a correct file path.
You should not be concerned here with what Keyboard Maestro or the macOS will tolerate. You should be concerned with how to construct a correct file path on Unix.
Create New Folder.kmmacros (5.9 KB)
As you can see I've disabled the Create New Folder action in favor of a Display Text in Window action.
This lets me completely visualize the file path I've built, and I can test it in the Terminal or a BBEdit shell worksheet (my general preference for this sort of thing).
Here is the created path:
It will NOT work in a normal shell environment, because of the embedded spaces. These need to be quoted or escaped.
Quote example 01:
Quote example 02:
Escaped example 01:
These methods MUST be used IF you're working in a shell environment.
BUT — Keyboard Maestro understands path strings with spaces in them and will escape them for you.
The big issue for you in this task is to make certain you've properly divided the nodes in your path with a forward slash.
To see if a path string works you can create your file or folder in the location you want it and then use ⌘⌥C in the Finder to copy the item's path string.
If that matches the path string you've created in your macro then you're good to go.