Possible to inject a msg.payload into fields in nodes that take strings?

Hi, long time user...
I see a number of nodes that don't let me interact with msg.payload but instead take a string as input. A good example is the write file node, image below. The field 'Filename' does not take in a msg.payload so I can't dynamically name files that are written. What is the best way to enable the possibility of passing in the value that I want to be used as the filename? I would think that something like "/home/user/[msg.payload]" would be an approach to the field input but I don't see anything in docs that would address this? Am I missing it?



You should read the help for each node. The write file node you can specify the filename by specifying
msg.filename - msg.payload contains the content to write.

ah, I did read the help, but did not realize the "msg." part meant it could be passed in. Learn something new every day! thank you...

1 Like

Actually that managed to get me past the file write node, but there is another node (FS Remove Node, which is part of the Filesystem Operations nodes from Advantech Czech, and I have seen other nodes like it) that do not have a "msg." component that can be accessed via the payload and don't have a properties setting to allow one to choose a msg/flow variable, they just have a string field as input. Is there no way to introduce a msg component into a string field like my original post ("/home/user/[msg.payload]")? Seems like there lots of nodes that have this limitation that could be worked around if such capability existed...

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.