Workflow with Python and Flow Variables

python
#1

Hello everyone,
I am new to KNIME and have a problem: A Python Node splits one Excel file into many smaller Excel files and saves them in a folder on my computer.
Now I want to create a workflow in which KNIME reads another Excel file with Email addresses for different persons. KNIME should extract the Email address, and send an Email to this address with the fitting Excel file as attachment. The splitted Excel files are named the same as the contact persons.
As an example: KNIME should read that person A has the Email address "a@example.com" and send an Email to this address with the attachment “a.xlsx”. But not only for A, but for many different contacts.
Is there any way to do this?
Best regards and thanks for your help,
Hänno

0 Likes

#2

I would think this is possible. It would help us if you could set up a simple example that represents your settings. Eg what does it mean if you say

0 Likes

#3

Hi there @therealhaenno,

welcome to KNIME Community!

Sure there is a way to do it. You should use Send Email node in a loop where in each iteration you send one mail with matching attachment using flow variables. I would go with Table Row to Variable Loop Start. Prior to loop start you need to join email addresses from Excel File with output from List Files node which lists attachements. Something like this:

If necessary I can share a workflow which demonstrates data preparation but not aware of your exact data structure so if you can share part of it I can include it in example workflow :wink:

Br,
Ivan

0 Likes