I’m trying to get e-mails coming to a mailbox thanks to Email trigger (IMAP) node. These e-mails contain an attachment.
What I want is to send this e-mail content + the attachment to my TheHive interconnection, by creating a case.
I can create basic cases, but I can’t create the attachment linked to it by using artifacts.
What is the error message (if any)?
The main problem that I’m having currently is the following one:
Problem in node ‘CreateAlert‘
No binary data exists on item!
It looks like the value you are using for the binary item is not correct, instead of email.eml;message/rfc822;{{ $('EmailTrigger').item.binary['attachment_0']['data']; }} it is normally something like data or attachment. If you check the output of the GenerateUUID node assuming it has a binary data field on it that will show you the value to use.
You can also generate a v4 uuid with the crypto node if you wanted to drop the code node.
Thanks for your quick answer.
That’s good to know for the UUID part - I was sure that our dear n8n would implement something like this but couldn’t find it, so I used JS ^^
For the attachment part, I don’t think there is other binary/data. When I retrieve {{ $('EmailTrigger').item.binary }}, I can see a JS object with information such as mimeType, and the data one:
We are getting closed to what I want!
Indeed, when I direct link the EmailTrigger node to TheHive node and put attachment_0 in the binary field, it’s creating TheHive alert with the file. Wonderful!
The problem is that I need a UUID node between both of them; and then, when I simply put attachment_0, it’s not retrieving it. And it does the same with {{ $node["EmailTrigger"].attachment_0 }}.
Any idea how could I say to my field that I want the attachment_0 from 2 nodes before?
I missed that reply, You would need to make sure the binary data is on the node before the one you need it. You can do this with a merge node like the example below.