Currenlty i try to send a email. I need json data (for text) and binary data (for attach).
I tried to multiplex (Merge multiplex not works it all for binary data) with a function node:
const bin = $node.Pdf.binary.data
for (item of items) {
item.binary = {};
item.binary.data = bin;
}
console.log(items);
return items;
What is the error message (if any)?
Binary not contains binary data. Only File meta data
Please share the workflow
Currently Impossible. Because there are some internal data in the workflow.
I will provide an example tomorrow.
But for me it shows also binary data in the browser. If I click on the “view” button it shows an error because it’s empty.
I hope it’s fine if I send an reproducible example tomorrow.
Probably worth mentioning that I was using N8N_DEFAULT_BINARY_DATA_MODE=filesystem when testing this. Perhaps you can confirm whether you are using a different setting here when posting your example.
Okay. Multiplex magically works today.
I don’t know why it didn’t work yesterday.
I can’t get the function node to work (even though I don’t need it now). Still, it would be useful here to know what I’m doing wrong.
Btw. i am using default settings for N8N_DEFAULT_BINARY_DATA_MODE
As for your first previous question I think (though haven’t confirmed this) binary data isn’t supposed to be accessed across different nodes. With N8N_DEFAULT_BINARY_DATA_MODE=filesystem the binary item is however a simple reference to a file on your hard drive, so I wonder if this is what has made it work in the end.
Either way, the Merge node should simplify things a lot here, so I am glad to hear this works.