I have problems forwarding attachments with the Send Email node. Here’s what I try to do:
I receive emails with IMAP Emails (works )
I extract, transform, enrich data from the email body via Function and HTTP Request nodes (works )
I create and send an email using the results of that transformation for email content (works , new mail with additional information arrives in my post box)
However, now I want to add attachments of the original email to the mail that I send. But I cannot figure out how and I cannot make sense of the examples I find in this forum.
I tried and add a reference in the attachments field of Send Email, like {{$node[“IMAP Email”].binary.attachment_0}} or {{$node[“IMAP Email”].binary}} but no attachment is sent. I think I understood that this has to do with the reference somehow pointing to the parameters only and not the data. But how to I access the data? Any hint is highly appreciated.
In your workflow do you change the Binary Property? To help you better understand, in your IMAP node the value of the Binary Property is attachment_0. Throughout the workflow if you don’t change the value, you can add attachment_0 in the Send Email node.
If you can share the workflow, we can take a close look.
(Check out this to learn how you can share the workflow: How can I contribute? | Docs)
The problem is that the binary data gets “lost” in the second HTTP Request node (“Testing Tools”) as it replaces the data. So what you would have to do is to merge it back in again.
You can do that with a Merge node set to “Merge By Index” like this:
In your case you have to add the Merge Node before the “Send Email” node with the second input connected to the first node (“IMAP Email”).