How to export workflow .eml files to excel

Hi. How to export an .eml file correctly to extract attachments such as .pdf, .doc, .xls, .jpg, etc.
The Tika Parser node outputs all information in the table except the message about the number of attachments. Is there any way to create an additional column with a list of the number of attachments and their type? And what node should be used to extract an attachment from an .eml file in its original appearance?

Hi,
The Tika Parser has an option to save attachments in a separate folder. Maybe you could use that and then use a List Files/Folders node to list them, then use GroupBy to count?
Kind regards,
Alexander

3 Likes

extracting the recipient or recipients of the message from the .eml file how to do it. Tika Parser doesn’t give me this information. Only the author (sender) is shown.

Hi,
An .eml file is text based and as luck would have it, the very first line is the recipients:

Delivered-To: alex@knime.com

(not my real email address)
So you can just use a Line Reader node and limit the number of lines read to 1 and you should get what you need out of the file. You can use a Regex Split or Cell Splitter, or simply a String Manipulation node to parse the line.
Kind regards,
Alexander

1 Like

Unfortunately, it does not show me the e-mail addresses if there are more of them, i.e. the message is sent to many people or the e-mail recipient is one of many. is there an option to extract it?

Hi,
There is also a line that starts with To: in the eml. This should be what you are looking for.
Kind regards,
Alexander

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