Hi, I'm using n8n 2.15.0 in Docker. My Read Binary File node reads an HTML file, passes it to a Code node where I decode the base64 with Buffer.from(item.binary.data, 'base64').toString('utf-8'), then send the text to WordPress via HTTP Request node. But

Hi, I’m using n8n 2.15.0 in Docker. My Read Binary File node reads an HTML file, passes it to a Code node where I decode the base64 with Buffer.from(item.binary.data, 'base64').toString('utf-8'), then send the text to WordPress via HTTP Request node. But the WordPress post content shows garbled characters. The HTML file is UTF-8 encoded. Any ideas?

Welcome @Michael_White to our community! I’m Jay and I am a n8n verified creator.

The garbled characters usually come from how the HTTP Request node sends the content to WordPress. Two things to check: first, make sure your HTTP Request body is set to JSON with Content-Type: application/json and the content field value is your decoded string directly (not re-encoded). Second, the WordPress REST API content field expects plain text or HTML, but it also accepts {"raw": "your html string"} format which handles encoding more cleanly. Also verify the decoded string itself looks correct by logging console.log(decodedHtml.substring(0, 100)) in the Code node - if it’s already garbled there, the issue is in the file itself or the Read Binary File node config.