Createing channel from globs not working

I have a params file that provides params.inputDirs as a list of absolute paths to a NF workflow.

I currently create a channel using Channel.from(params.inputDirs) without issue and pass it to the process to run the command.

I want to parallelize this by globbing for each one of the inputDirs a sub directory like “$inputDir/folder/item*”, assuming they are item_1, item_2 etc, and create a channel from this and flatten it so for each inputDirs and each item a new process is executed.

When I try to do this however I get an error saying Dataflow val is not path type.

Ideally it’s a channel of channels that I could execute on.