If statement sends a blank record and is breaking my workflow

I have an if statement to count if there are multiple records. If there are not the false just ends. If there are it should follow a series of other steps. It works fine when there are more than 2 records but when there is 1 it appears N8N is sending 1 item to both branches of the flow. This is causing the true path to fire and error out since there is no record. I would think if the condition is not met then it would only follow the true or false path and ignore the other.

Hi,

the problem is that you have enabled “always output data”. when set it will output “1 item” but which is an empty json object.

Please accept this as a solution if this answers your question.

Reg,
J.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.