When trying to use the Read/Write Files from Disk node, how is one to handle a file not found condition? I tried telling the node to continue, with and with out using the date. It won’t happen often, but a new client will not have a file in the folder specified. If the file doesn’t exist, the workflow could branch to the file creation routine.
I don’t see an obvious way I can branch to the file creation upon a file not found.
Here’s my workflow. It works as is, but it would be nice if it could auto-create the file if it can’t find it. Also, I’m accepting feedback on my process.
That looks like we don’t actually show an error if the file doesn’t exist which could be a bit careless. I think the best thing to do depending on how you are running n8n is use the execute command node to check if the file exists. So something like the below…