Dear community,
I get an error I can't fix when running my flow containing 2 lines:
- The first runs a powershell script that at the end generate a text stored in the variable %PowershellOutput%.
- The second, "Create Folder", with "New folder name" : %PowershellOutput%
This flow fails at the second step with the error below:
Correlation Id: 99df0749-7b20-4469-910f-9de256361e33
Illegal characters in path.: Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Can't create folder folder
into C:\Users\XXXXXXX\OneDrive - XXXX\Desktop. ---> System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.Combine(String path1, String path2)
at Microsoft.Flow.RPA.Desktop.Modules.Folder.Actions.FolderActions.CreateFolder(Variant newFolderPath, Variant newFolderName, Variant& newFolder)
--- End of inner exception stack trace ---
at Microsoft.Flow.RPA.Desktop.Modules.Folder.Actions.CreateFolder.Execute(ActionContext context)
at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)
I checked that %PowershellOutput% was not containing any "Illegal characters" by setting the value to a simple "NewFolder" without any result. (I checked with a Display Message that the value was correct).
I also tried to use an "intermediate" variable containing th %PowershellOutput% and to use it in Create Folder as "New Folder Name" but it failed to.
Any help would be very welcome.
Regards.