Hi @Shane0513296 , and welcome to the KNIME forum.
I’ve written the following response, but am now wondering if I have fully understood the question. I can’t decide whether you want it to send a single email containing 5 rows, or five emails each containing one row… or one email containing one row…
So what I’ve written below is based on my understanding that what you want is for it to send one email for each row, and each email contains only one row of data. (i.e. 5 emails - within one row each). If that’s not the case, let me know and I’ll give an alternative solution.
What’s happening here is that all the rows from you DB Query Reader are being passed to the Row Filter and so, as you say all the rows are being sent with every email.
There are a couple of ways of changing this.
First off, you don’t want the rows from DB Query Reader to go anywhere other than to the Loop start.
So this is one option, in the Table Row to Variable Loop Start you’d configure it so every column from your data becomes a variable, and then you include a Variable to Table Row node, to convert the required flow variables back into a data row, for each iteration of the loop. So on each iteration there is a single row.
Of course, the question then is whether you need to turn everything into a variable and back into a row.
So the opposite approach is this:
Here, the loop processes one row at a time (by configuring the chunk loop to be 1 row per chunk), and then that one row on each iteration is passed to the row filter and onwards through the flow. Meanwhile, the Table Row to Variable node allows you to collect the required variables (if any) that you need for the later processing.
Note: I suspect that you no longer need the Row Filter (as I’m guessing - but don’t know for sure, as I cannot see what it is doing - that you have added that there to try to find a way of filtering the rows to 1 going to the email), in which case, delete the Row Filter and attach the other nodes to the Table to HTML String node instead.
To have it send only a single email, containing a single row. Use my second picture, but keep the row filter and remove the loop start and loop end nodes.
To have it send a single email containing the 5 rows, again use my second picture, remove the row filter, remove the loop start and end nodes.