I’m trying to get Knime to replace an old system that uses lots of macros to create a report. I’m really impressed with Knime, and I wish I knew about it sooner. There is a steep learning curve with creating macros in VBA to do certain job, but Knime doesn’t require any code, so it’s so much easier to understand.
Anyway, I managed to nearly finish creating all the files that I need, it’s just the emailing step that I am stuck on.
In VBA by using macros, you can attach an Excel file to MS Outlook and also copy a table from the Excel file into the body of the email.
Do you know how to do this in Knime? To summarise this is what I would like to do:
- Main objective, get Knime to attach a report (excel file) to an email.
I would like to user to double check the reports contents before sending, so I don’t want the email to send automatically.
- I would like Knime to show the contents of a table in the body of the email, and also show some text, for example:
Here is the daily report:
Column 1, Column 2, Column 3, Column 3
231231 123123 1231231 123123123
< Signature here >
If anybody could give me some advice, I would really appreciate it.
There is a Send Email node which you can use to perform first task. So when you are done with report and you write it down on file system you should attach it in Attachments tab of this node. If this path/report is changing you should use flow variable to control the path/report.
For the send task I guess you do not want the whole report in body of email rather just column names and couple of rows or? In any case I think you need to use flow variables for this as you can not insert whole table in this node (which would be a cool feature to have ). The first problem is using flow variables you won’t be able to see real values (so you can not check report in email body in KNIME) and the second problem is if you want to have whole table in email body that that is a lot of flow variables and formatting is a pain… Of course this depends on table length.
My advice is to check report manually before you send it simply be opening Excel file locally or through some KNIME node. With time maybe Send Email node will get new features ot some new node comes up
Thanks for your reply and sorry for my late response.
I looks a little tricky to do what I want to do.
At the moment I can generate an email via VBA in Excel, and it write the body of the text and shows a table from the Excel file. Ideally I wanted to do everything in Knime