File not found
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.
It looks like your topic is missing some important information. Could you provide the following if applicable.
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system:
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…
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.