Ho to read email forwarded as an attachment using Imap node

Hi team,

Hope you are doing well.
I have my workflow working fine. But i have a problem that i was not considering and it’s causing some issues.
I’m able to read the emails that are being triggered by Imap node.
The scenario is that the email that i need to read is attached in the email triggered by imap node.
This scenario is for example when someone receive a phishing email he fowards that email to the mailbox that Imap node will trigger and i need to to create cases in theHive based on the content on email attached. How can i do it?
My Goal is to read the original email.
Can you please give some tips.

The example of the email that i get from Imap node.

How was checking the node Function Item

And put these lines

Is there a way i can can a content of the file here?
Thanks in advance.

Hi @hermanmaleiane, you can use the Move Binary Data node to convert the attachment data field into a JSON object.

Move Binary Data configuration:

Let me know if that helps

Hi @dali.
Thanks for helping.
Move to Binary doesn’t return data well formatted and it still brings headers that’s not part of the original email.

I think the best solution is use email parser that we have seen in this question that i posted.

Hey @hermanmaleiane!

Were you able to find a solution? Please let us know if you still need more help :slight_smile:

1 Like

Hi @harshil1712,
I have managed to fix the issue using external lib.

Thank you

1 Like