I have a “Read/Write Files from Disk” node. The data comes in from a “Convert to JSON” node and is written well. But now I want to input additionally the filename for the file to save - and if I connect the source node for the filename also with the input of the Write node, neither the data nor the filename is recognized in the node. How do I set the filename and the data correctly in the Write node?
Hey @konradsl To save a file in n8n with a custom, dynamic filename from two separate data streams, you can use a Merge node to combine your JSON content and filename first, or use a Code node for more complex scenarios.
This allows you to pass a single, unified data stream to the Write node.
Hope this helps!
Hi @konradsl is it possible to share your existing workflow in a code block so we can better analyze your issue. There is a few ways to resolve this kind of issue
Oh yeah no this wont work. Rather move the Filename node to be inline with other nodes. Something like below. Then in the Read/Write node, you can reference the filename from the Filename node by referencing the name like `$(‘Filename‘).first().json.filename`
Thank you. That worked ![]()
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

