How can I send multiple email attachments

how can i send multiple email attachments. i get the attachments via get request from my crm.

Assuming you have the attachments saved in the binary properties “data1” and “data2” you would write in the “Attachments” parameter data1,data2

Ok that’s not so comfortable, I have one get request with multiple attachments

how can I iterate this attachments to add this to the send module

You do not need to iterate. The Send Email node will do it for you. As Jan mentioned before, you just have to provide the values comma separated.

Hello Ricardo, yes that’s right, but then I have to create for each attachment a http request module and that is not so dynamically, do you know what I mean? Look at my screenshot.

Not necessarily. You can put them in different items. One HTTP Requst Node will then download all of them, no matter if 1 or 100. After it, can you use a Function-Node to merge all of the different items into a single one.

ok do you have an example. i have to set the filename in the url in the api call. but how can i iterate the json[“0”] !

Here an example:


Thanks Jan, now there is this error

sorry now it works fine, thanks for your support.

Sure, glad to hear that you got it working.

Sorry but it works only when I write harcoded the api endpoint in the url field, like table id, database id record id etc. but when I paste this nodes in the url it doesn’t work. Then comes the error 401

That was only a simple example. You have to replace the URL according to your use case with the correct fixed parts and variable parts (expressions).

Considering that you will just have one item in the Webhook-Node the variables will have to look like this:
{{ $item(0).$node["Webhook"].json["body"]["Ninox_TeamID"] }}

ok this is too hard for me. i have now simply assembled the api url in ninox
and sent it to the webhook. the filename i have then added at the end and the iteration does n8n. thanks it is now finally running.i am happy.

Happy to hear that you found a solution. Have fun!

Would be wonderfull to find this on the documentation. It’s an easy way of doing it and I’ve been looking for it for hours…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.