I’m new to n8n, and I created a flow to look at new files created in folders, but I’m getting this error when the folder is empty, and this can happen for some folders, how could I solve it?
Error: No data with the current filter could be found
I’m new to n8n, and I created a flow to look at new files created in folders, but I’m getting this error when the folder is empty, and this can happen for some folders, how could I solve it?
Error: No data with the current filter could be found
Hi, maybe the node has a setting “continue on error”? Or build a custom error handling logic. It would be better if you could share your workflow instead of a screenshot
Reg,
J.
There is no such option in this trigger, my difficulty is precisely this, how do I create a logic to handle this error, if when the error occurs it does not advance to the next step.
Print showing that there isnt option in this trigger
And Workflow:
The fileCreated trigger gets triggered when a new file appears in the folder, so it cannot be empty at the moment the trigger fires off.
If you forcedly trigger the event what you expect n8n to do? It won’t create a file for you to provide you with any test data. It wouldn’t be OK for a reading node to write data, a potential nightmare to debug.
And isn’t there another trigger I can use to monitor and have this check?
Meaning you want to test the workflow? Just put a file you want to work with in the folder. It will be presented in the trigger’s output at the test executions as if it was just added.
If you want to see how it works in production, then emulate the situation - add the file while the workflow is active. Then inspect the Executions tab.
No, I wanted to know if there is any other alternative to this trigger, so that I can, in case of an error because it is empty, go to the if. I’m still new to this, so I don’t understand if this is the only function of the trigger and that’s it.
What is the business logic you are implementing? What other ways to read the folder content did you try?
This error is specific to the trigger on a situation when you test the workflow. It won’t arise on production.
The logic is, I’m going to generate the PDFs from a file in my Google Sheets, and it will save it in this folder that is empty. However, some folders will not have PDFs, because the company did not participate, so it may be empty in this flow.
But from what I understand, if it is empty it is not a problem, right?
Another thing, if there is already a file in this folder, when running the script to generate the PDF and not generating a new one for this folder, will it get this file that was already there, but that was not recently created?
The purpose of the trigger that reacts on new files is exactly to react upon new files arrival.
If you want to process files that are already in the folder you probably want this done only once. You’d need to add another branch that would be triggered manually, read current files from folders and then wire it into your existing workflow that processes the files received from the trigger.
I didn’t know you could do these things, very interesting, thanks.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.