Merge multiple binaries with distinct names into one result to send multiple attachment

Hello, I would like to send a single email using basic Email Node but with multiple attachments I generate during the workflow with Spreadsheet Node. I can’t manage to do so and get all binaries merge into a single results (array first item).
Could you help me please ?
Best regards,
Antoine

Hello @mediana, welcome to the community.

Sorry, I do not understand exactly what you mean so I hope this example is helpful. I used now for simplicity reason HTTP Request nodes. All I did is to write each of the files to different binary properties and then set them it to the Send EMail node.

{
  "nodes": [
    {
      "parameters": {
        "url": "https://images.sftcdn.net/images/t_app-cover-l,f_auto/p/ce2ece60-9b32-11e6-95ab-00163ed833e7/260663710/the-test-fun-for-friends-screenshot.jpg",
        "responseFormat": "file",
        "dataPropertyName": "data1",
        "options": {}
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        450,
        500
      ]
    },
    {
      "parameters": {
        "url": "https://www.outbrain.com/techblog/wp-content/uploads/2017/05/road-sign-361513_960_720.jpg",
        "responseFormat": "file",
        "dataPropertyName": "data2",
        "options": {}
      },
      "name": "HTTP Request1",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        650,
        500
      ]
    },
    {
      "parameters": {
        "attachments": "data1,data2",
        "options": {}
      },
      "name": "Send Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 1,
      "position": [
        850,
        500
      ]
    }
  ],
  "connections": {
    "HTTP Request": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

If it is not helpful please supply a simple example workflow. I can then use that as a base and make it work. Thanks!

Hello Jan,
Thank you for your answer.
My need is a bit different.
Here is the example workflow.
At the end, I would like to send a single email with both files and therefore ‘merge’ the 2 binaries, without having them ‘inline’ like in your example.
Best regards,
Antoine

{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "attachments": "[1]data,[2]data",
        "options": {}
      },
      "name": "Send Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 1,
      "position": [
        800,
        300
      ],
      "disabled": true
    },
    {
      "parameters": {},
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 1,
      "position": [
        640,
        300
      ]
    },
    {
      "parameters": {
        "url": "https://via.placeholder.com/300",
        "responseFormat": "file",
        "options": {}
      },
      "name": "HTTP Request #1",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        460,
        220
      ]
    },
    {
      "parameters": {
        "url": "https://via.placeholder.com/400",
        "responseFormat": "file",
        "options": {}
      },
      "name": "HTTP Request #2",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        460,
        370
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "HTTP Request #1",
            "type": "main",
            "index": 0
          },
          {
            "node": "HTTP Request #2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request #1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request #2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}

Sorry but do not understand what you mean. My example above sends one email with both attachments.

And what do you mean with “without having them inline”? If your example would work, what would be different and what would not be “inline” anymore?

Also do not understand “merging” two binaries? The only thing I can think of there is to combine two images into one (to have one larger image) or combining multiple random files by making a zip file out of them.