I recommend to use the Local File Browser Configuration for that. It prevents typos because the filename is not manually typed in.
String configuration also works, but the Flow Variable then has to be changed to the right type (Path) manually.
Here’s an example of how that would look like. One more thing: Flow Variables don’t automatically leave the component.
Let me know if that works for you. If not, I need you to share your workflow. This link about minimal reproducible examples might help with that.

user input file name.knwf (32.7 KB)