How can you save data in a network drive that requires username and password, and be able to dynamically change the file name based on a flow variable, using Node-Red in a Epic Controller

I have tried SMB node and it works fine, but I can’t dynamically change the file name.

You can often get a lot of node help by selecting the node in the flow, then clicking on the help button in the menu.
In the case of the SMB node, you can see from the following screen shot that you can dynamically set the file name by using the flow variable ‘filename’.