Sending from Gmail with attachments

I’m able to use the read binary file node but have been unsuccessful getting Gmail to include the file as an attachment. I’ve tried passing the property name and a few different expressions but feel like I’m missing something. Based on reading the documentation, it seems like the property name should work. Not sure where to go from here - can someone test on their end and see if they can get Gmail to send an attachment via n8n?

image

Welcome to the community @bram5c!

So just to be sure. A binary property with the name “attachment_0” exists?

I now just tested. And works fine for me. Here an example workflow:

{
  "nodes": [
    {
      "parameters": {
        "resource": "message",
        "subject": "The subject",
        "message": "The message",
        "toList": [
          "[email protected]"
        ],
        "additionalFields": {
          "attachmentsUi": {
            "attachmentsBinary": [
              {
                "property": "data"
              }
            ]
          }
        }
      },
      "name": "Gmail Send Encoding1",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 1,
      "position": [
        650,
        300
      ],
      "credentials": {
        "gmailOAuth2": ""
      }
    },
    {
      "parameters": {
        "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Test-Logo.svg/783px-Test-Logo.svg.png",
        "responseFormat": "file",
        "options": {}
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        450,
        300
      ]
    }
  ],
  "connections": {
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Gmail Send Encoding1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}