Gmail, IMAP & textHtml

Trying to use “EmailReadImap” node to fetch emails. This is what I got as node result:


Is there a way to parse this binary data and get message body as text?

BTW “textPlain” is empty for some reason:

Not sure why “textPlain” is empty; I’ve never had that error.
I use a Set node to simply filter out the scruff :slight_smile:
Here’s a part of my workflow, if it helps

{
  "nodes": [
    {
      "parameters": {
        "mailbox": "Inbox",
        "postProcessAction": "nothing",
        "options": {
          "allowUnauthorizedCerts": false
        }
      },
      "name": "IMAP Email",
      "type": "n8n-nodes-base.emailReadImap",
      "typeVersion": 1,
      "position": [
        450,
        300
      ],
      "credentials": {
        "imap": "Your IMAP Credentials"
      }
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "From",
              "value": "={{$node[\"IMAP Email\"].json[\"from\"]}}"
            },
            {
              "name": "Sent",
              "value": "={{$node[\"IMAP Email\"].json[\"date\"]}}"
            },
            {
              "name": "Subject",
              "value": "={{$node[\"IMAP Email\"].json[\"subject\"]}}"
            },
            {
              "name": "Body",
              "value": "={{$node[\"IMAP Email\"].json[\"textPlain\"]}}"
            }
          ]
        },
        "options": {}
      },
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    }
  ],
  "connections": {
    "IMAP Email": {
      "main": [
        [
          {
            "node": "Set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}