I found reference to similar issue Anymatch in local file trigger, I tried all the suggestions and it didn’t work.
I have Local File Trigger node, that needs to be triggered by any file but should ignore files with extension .json
I tried the following:
With Ignore fixed : /*.json
With Ignore expression: {{ ['/*.json’]}}
I found this reference, and use it, but did’t work.
What is the error message (if any)?
It is just process, and continue the workflow when *.json file was added to the directory.
Just checked on 1.72.1 and 1.78.0, and it appears that the “ignore” option is indeed ignored (i.e. you are correct… it doesn’t work as advertised).
So, until this is fixed, you can avoid further processing files you want to ignore by following the trigger node with a Filter node, and putting the rules there.
Which i can also confirm since the newly added n8n option Ignore Mode “Contains” does work since it wraps the value into a function
From what I can tell from a quick code check is that it is also no longer possible to use anymatch in the watched path directly,
so a path like “/home/myuser/downloads/*.txt” to only match .txt files
(so the opposite of the Ignore option in n8n is also not possible, though I’m not sure if this ever worked anyway but I did have a workflow setup in the past that would only trigger for a specific file extension, not sure which way I build that though)
Would love to see this fixed in n8n, would drastically reduce the amount of runs n8n initiates just to stop in the next IF node…
(Would also be great if it would be allowed to define a function in n8n too, as that gives a lot more flexibility than if the values set in n8n were just wrapped into a function just like the MacOS “Contains” fix…)