Anyone know how to send out dynamic email attachments? I have automated a report I work on daily; however, this reports has a time stamp as part of the naming convention, as such, I’d need some sort of flow variable to change the changing path of the file. I read on other posts that typing in File:/a would work, I have tried it and I am not seeing it under the Flow Variables option.I am attaching a screenshot of my work flow and what I have done.
you should create a flow variable type array that will hold URLs pointing to files you want to send as attachments. This flow variable then choose as attachedURLs value.
If your attachments are all in same folder you can use following logic to obtain flow variable type array:
Thank you for the help it works. Also, I keep receiving the emails on the junk folder. I tried changing the junk functions, added to allowed emails and not junk options and still the messages are being received onto the Junk Email options. Any other way we can address this? Or, is this something the IT at my office will have to fix?
Hi,
I´m using the node to send email through a cycle, in this cycle i group the individuals by the entity to wich they belong, wich is why i can have more than one variable attachment by mail.
How can i attach n files according to the iteration?
For example, an iteration can have only one individual (only one attachment), and the netx iteration can have two inidividuals(two attachments).
well in each iteration you will create flow variable with URLs pointing to file(s) you want to send as attachment(s). You need to create logic that will based on entity create appropriate flow variable in each iteration.
Hi @ipazin
Thanks for the answer, but, can you be more especific please?
I get groups for entity, for each entity i´m sending one email with variable number of attachments, how can a i make this (Send email) node take this n variables?
sure I can but can you give me some data? Those groups with entities you get and explain your process a bit more like where are attachments you want to send and do you need to apply some logic based on entity/group or you have defined which files go for which entity/group…
I using the GroupBy for group only the cases of each entity. After of this, i using a cell spliter for get the files path in the same row, so this result seen like this :
Then I use the table row to variable loop start and start to take de rows sending the email for entity:
But, this workflow only would works for cases in than only be a two attachment, can be cases than i have n files to attach, which would be reflected with the cell splitter shown above, as new columns, so despite entering as variables to the email node, in this I can not find a way to configure them regardless of the number that are…
Do you have any idea how I could do it?
yep. It is pretty clear. So first I noticed you have a different Flow Variables tab in Send Email node which probably indicates you don’t have newest KNIME version as new flow variable types are available from 4.1.0. so I suggest to update. Here is how I did it using new flow variable type Collection/List:
Basically you create list of files in GroupBy node. Then you take row by row with Chunk Loop Start (similar to Table Row to Variable Loop Start but haven’t used it cause it is not supporting new flow variable types, yet) and then inside loop create flow variable which I use in Send Email node:
@ipazin Thank so much!!
After to actualice mi Knime version, it works like you explain it.
However, I have a problem for other types of variable attachments. in the olds version of Knime than i had, i could adjunt more than one attachment like variable, just like seen here:
If i put file:/test in the attachment configuration window, in the flow variables showme as many options as “file: / test” I put, like this:
Do you know if in version 4.1.1 of knime this is also possible?
glad it works now. Don’t think it is possible to have multiple options for attachments as used to be. But can’t you have all attachments in one collection flow variable?
Hi @ipazin ,
I had several files that came from different parts of the flow, that is, both the n files that came in the same column, and another file that I also send per entity, and that came in another column from another part of the flow, like this:
However, I found the way to have all url attachments in the same column, and then with what you taught me to list them in the send email node, I could do it without problem
Thank you very much for your help,
It really helped me a lot what you told me
If you can send attachments from it then you can configure KNIME workflow to send dynamic ones cause I don’t think they (dynamic attachments) affect safety in any way What are you concerns?