ERROR: No property named "textHtml" exists! in JSON Property of HTTP Extract Node

Hello everyone,

I’m having a problem with extracting URLs with the HTTP Extract node.

I want to extract urls from an email and when I indicate the JSON property containing the html of the email, I get an error that tells me that this property does not exist, what to do?

Have a nice evening,

Welcome to the community @Pxul

Is the node before the HTML Extract returning the data? Can you please share your workflow? To do so, select all the nodes, copy and then paste them here.

Good evening Ricardo,

I modified my workflow a bit and the JSON property is now called “content” but the problem remains the same, n8n says it doesn’t exist when it does as you can see on the first screen.

Have a nice evening,

Hey Ricardo,

Have you see my last message ?

Somehow I missed that message. Sorry about that.

You did not answer my question in the last comment. Is the node before the HTML Extract returning the data?

Can you share your workflow? With only the pictures is hard to figure what is happening. When you share your workflow the credentials are not shared.

Hello Ricardo,

Yes for sure !

{
  "name": "TEST",
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        0,
        360
      ]
    },
    {
      "parameters": {
        "operation": "delete",
        "messageId": "={{$node[\"IMAP Email\"].json[\"messageId\"]}}"
      },
      "name": "Delete Mail",
      "type": "n8n-nodes-base.microsoftOutlook",
      "typeVersion": 1,
      "position": [
        1200,
        260
      ],
      "credentials": {
        "microsoftOutlookOAuth2Api": {
          "id": "11",
          "name": "Microsoft Outlook account"
        }
      }
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "channel": "général",
        "text": "Hello je suis Pablo",
        "attachments": [],
        "otherOptions": {}
      },
      "name": "Notify User1",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 1,
      "position": [
        1200,
        450
      ],
      "credentials": {
        "slackOAuth2Api": {
          "id": "15",
          "name": "Slack account"
        }
      }
    },
    {
      "parameters": {
        "dataPropertyName": "=textHtml",
        "extractionValues": {
          "values": [
            {
              "key": "url",
              "cssSelector": "a",
              "returnValue": "attribute",
              "attribute": "href"
            }
          ]
        },
        "options": {}
      },
      "name": "HTML Extract",
      "type": "n8n-nodes-base.htmlExtract",
      "typeVersion": 1,
      "position": [
        400,
        250
      ]
    },
    {
      "parameters": {
        "path": "b8a491b5-d541-4000-92d1-c9eb47fb00a6",
        "options": {}
      },
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        0,
        560
      ],
      "webhookId": "b8a491b5-d541-4000-92d1-c9eb47fb00a6"
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "channel": "général",
        "text": "Hello je suis Pablo",
        "attachments": [],
        "otherOptions": {}
      },
      "name": "Notify User2",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 1,
      "position": [
        1400,
        260
      ],
      "credentials": {
        "slackOAuth2Api": {
          "id": "15",
          "name": "Slack account"
        }
      }
    },
    {
      "parameters": {
        "authentication": "headerAuth",
        "requestMethod": "POST",
        "url": "=https://www.virustotal.com/api/v3/urls",
        "options": {
          "bodyContentType": "form-urlencoded"
        },
        "bodyParametersUi": {
          "parameter": [
            {
              "name": "url",
              "value": "={{$json[\"url\"]}}"
            }
          ]
        },
        "headerParametersUi": {
          "parameter": []
        },
        "queryParametersUi": {
          "parameter": []
        }
      },
      "name": "Analyze URL ",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        600,
        250
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "7",
          "name": "VirusTotal"
        }
      }
    },
    {
      "parameters": {
        "authentication": "headerAuth",
        "url": "=https://www.virustotal.com/api/v3/analyses/56167036f14fd519bc0ea8781ab0e13aceb9462c986d952ac6e284570221eb5f-1636449308/",
        "options": {},
        "headerParametersUi": {
          "parameter": []
        },
        "queryParametersUi": {
          "parameter": []
        }
      },
      "name": "Get URL Analyse",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        800,
        250
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "7",
          "name": "VirusTotal"
        }
      }
    },
    {
      "parameters": {
        "authentication": "headerAuth",
        "url": "https://www.virustotal.com/api/v3/files/8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85",
        "options": {},
        "headerParametersUi": {
          "parameter": []
        }
      },
      "name": "Get File Analyse",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        800,
        460
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "7",
          "name": "VirusTotal"
        }
      }
    },
    {
      "parameters": {
        "authentication": "headerAuth",
        "requestMethod": "POST",
        "url": "=https://www.virustotal.com/api/v3/files/",
        "options": {
          "bodyContentType": "multipart-form-data"
        },
        "bodyParametersUi": {
          "parameter": [
            {
              "name": "file",
              "value": "={{$binary.attachment_0.fileName}}"
            }
          ]
        },
        "headerParametersUi": {
          "parameter": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "Content-Type",
              "value": "multipart/form-data"
            }
          ]
        }
      },
      "name": "Analyze File",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        600,
        460
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "7",
          "name": "VirusTotal"
        }
      }
    },
    {
      "parameters": {
        "value": "={{$binary.attachment_0.fileName}}",
        "encoding": "base64"
      },
      "name": "Compute Hash",
      "type": "n8n-nodes-base.crypto",
      "typeVersion": 1,
      "position": [
        400,
        460
      ]
    },
    {
      "parameters": {},
      "name": "Malicious ?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        1000,
        350
      ]
    },
    {
      "parameters": {
        "operation": "getAll",
        "limit": 1,
        "additionalFields": {
          "dataPropertyAttachmentsPrefixName": "attachment_"
        }
      },
      "name": "Get Mail",
      "type": "n8n-nodes-base.microsoftOutlook",
      "typeVersion": 1,
      "position": [
        200,
        360
      ],
      "credentials": {
        "microsoftOutlookOAuth2Api": {
          "id": "11",
          "name": "Microsoft Outlook account"
        }
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Get Mail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete Mail": {
      "main": [
        [
          {
            "node": "Notify User2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML Extract": {
      "main": [
        [
          {
            "node": "Analyze URL ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze URL ": {
      "main": [
        [
          {
            "node": "Get URL Analyse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get URL Analyse": {
      "main": [
        [
          {
            "node": "Malicious ?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get File Analyse": {
      "main": [
        [
          {
            "node": "Malicious ?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze File": {
      "main": [
        [
          {
            "node": "Get File Analyse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compute Hash": {
      "main": [
        [
          {
            "node": "Analyze File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Malicious ?": {
      "main": [
        [
          {
            "node": "Delete Mail",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notify User1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Mail": {
      "main": [
        [
          {
            "node": "Compute Hash",
            "type": "main",
            "index": 0
          },
          {
            "node": "HTML Extract",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "id": 5
}

When I execute the Get Mail node, the output does not include a property called textHtml. I think that what you do want is body.content. Extract it with a Set node and then reference it in the HTML Extract node.

Example workflow
{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        -240,
        180
      ]
    },
    {
      "parameters": {
        "operation": "delete",
        "messageId": "={{$node[\"IMAP Email\"].json[\"messageId\"]}}"
      },
      "name": "Delete Mail",
      "type": "n8n-nodes-base.microsoftOutlook",
      "typeVersion": 1,
      "position": [
        1240,
        450
      ],
      "credentials": {
        "microsoftOutlookOAuth2Api": {
          "id": "227",
          "name": "asasasasas"
        }
      }
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "channel": "général",
        "text": "Hello je suis Pablo",
        "attachments": [],
        "otherOptions": {}
      },
      "name": "Notify User1",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 1,
      "position": [
        1240,
        640
      ],
      "credentials": {
        "slackOAuth2Api": {
          "id": "402",
          "name": "Slack account"
        }
      }
    },
    {
      "parameters": {
        "dataPropertyName": "content",
        "extractionValues": {
          "values": [
            {
              "key": "url",
              "cssSelector": "a",
              "returnValue": "attribute",
              "attribute": "href"
            }
          ]
        },
        "options": {}
      },
      "name": "HTML Extract",
      "type": "n8n-nodes-base.htmlExtract",
      "typeVersion": 1,
      "position": [
        460,
        440
      ]
    },
    {
      "parameters": {
        "path": "b8a491b5-d541-4000-92d1-c9eb47fb00a6",
        "options": {}
      },
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        40,
        750
      ],
      "webhookId": "b8a491b5-d541-4000-92d1-c9eb47fb00a6",
      "disabled": true
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "channel": "général",
        "text": "Hello je suis Pablo",
        "attachments": [],
        "otherOptions": {}
      },
      "name": "Notify User2",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 1,
      "position": [
        1440,
        450
      ],
      "credentials": {
        "slackOAuth2Api": {
          "id": "402",
          "name": "Slack account"
        }
      }
    },
    {
      "parameters": {
        "authentication": "headerAuth",
        "requestMethod": "POST",
        "url": "=https://www.virustotal.com/api/v3/urls",
        "options": {
          "bodyContentType": "form-urlencoded"
        },
        "bodyParametersUi": {
          "parameter": [
            {
              "name": "url",
              "value": "={{$json[\"url\"]}}"
            }
          ]
        },
        "headerParametersUi": {
          "parameter": []
        },
        "queryParametersUi": {
          "parameter": []
        }
      },
      "name": "Analyze URL ",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        640,
        440
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "7",
          "name": "VirusTotal"
        }
      }
    },
    {
      "parameters": {
        "authentication": "headerAuth",
        "url": "=https://www.virustotal.com/api/v3/analyses/56167036f14fd519bc0ea8781ab0e13aceb9462c986d952ac6e284570221eb5f-1636449308/",
        "options": {},
        "headerParametersUi": {
          "parameter": []
        },
        "queryParametersUi": {
          "parameter": []
        }
      },
      "name": "Get URL Analyse",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        840,
        440
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "7",
          "name": "VirusTotal"
        }
      }
    },
    {
      "parameters": {
        "authentication": "headerAuth",
        "url": "https://www.virustotal.com/api/v3/files/8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85",
        "options": {},
        "headerParametersUi": {
          "parameter": []
        }
      },
      "name": "Get File Analyse",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        840,
        650
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "7",
          "name": "VirusTotal"
        }
      }
    },
    {
      "parameters": {
        "authentication": "headerAuth",
        "requestMethod": "POST",
        "url": "=https://www.virustotal.com/api/v3/files/",
        "options": {
          "bodyContentType": "multipart-form-data"
        },
        "bodyParametersUi": {
          "parameter": [
            {
              "name": "file",
              "value": "={{$binary.attachment_0.fileName}}"
            }
          ]
        },
        "headerParametersUi": {
          "parameter": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "Content-Type",
              "value": "multipart/form-data"
            }
          ]
        }
      },
      "name": "Analyze File",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        640,
        650
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "7",
          "name": "VirusTotal"
        }
      }
    },
    {
      "parameters": {
        "value": "={{$binary.attachment_0.fileName}}",
        "encoding": "base64"
      },
      "name": "Compute Hash",
      "type": "n8n-nodes-base.crypto",
      "typeVersion": 1,
      "position": [
        440,
        650
      ]
    },
    {
      "parameters": {},
      "name": "Malicious ?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        1040,
        540
      ]
    },
    {
      "parameters": {
        "operation": "getAll",
        "limit": 1,
        "additionalFields": {
          "dataPropertyAttachmentsPrefixName": "attachment_"
        }
      },
      "name": "Get Mail",
      "type": "n8n-nodes-base.microsoftOutlook",
      "typeVersion": 1,
      "position": [
        240,
        550
      ],
      "credentials": {
        "microsoftOutlookOAuth2Api": {
          "id": "227",
          "name": "asasasasas"
        }
      }
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "content",
              "value": "={{ $node[\"Get Mail\"].json[\"body\"][\"content\"] }}"
            }
          ]
        },
        "options": {}
      },
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        320,
        380
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Get Mail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete Mail": {
      "main": [
        [
          {
            "node": "Notify User2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML Extract": {
      "main": [
        [
          {
            "node": "Analyze URL ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Get Mail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze URL ": {
      "main": [
        [
          {
            "node": "Get URL Analyse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get URL Analyse": {
      "main": [
        [
          {
            "node": "Malicious ?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get File Analyse": {
      "main": [
        [
          {
            "node": "Malicious ?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze File": {
      "main": [
        [
          {
            "node": "Get File Analyse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compute Hash": {
      "main": [
        [
          {
            "node": "Analyze File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Malicious ?": {
      "main": [
        [
          {
            "node": "Delete Mail",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notify User1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Mail": {
      "main": [
        [
          {
            "node": "Compute Hash",
            "type": "main",
            "index": 0
          },
          {
            "node": "Set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set": {
      "main": [
        [
          {
            "node": "HTML Extract",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
1 Like

Hello Ricardo,

I thank you all works for me!

1 Like

Great that it worked. Have fun.