Get a previous nodes Binary data and insert to POST HTTP Request body or create HTML on the next node using the image

Describe the problem/error/question

I need to download an image and send the base64 binary response via HTTP POST request and set the image in a Create HTML tag as a base64.

I am not interested in providing the upload link as the receiving server or the person opening the HTML cannot access the link.

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • **n8n version:1.98.1
  • **Database (default: SQLite):Postgres
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): Default Railway config

You are facing a problem because you didn’t host the image file anywhere.
You should upload the image to the internet first, get a link to the image and then use it in N8N.

Here is the solution:

Signup at https://imgbb.com
Then get an API key at https://api.imgbb.com and paste it into “key” field in the HTTP request 2 node below.

If you need any help with html design or later in the workflow, just email me at [email protected] or you can message me here too. Happy to help!

An n8n binary response from a node cannot be converted into base64 inside n8n?

I think you need a script to convert the response to base64

Yes, you can use the base64 node

Use this node to convert the binary data to base64 and then use the string in the html node

Full example below. PS the editor preview might not render the image hence I added the webhook and respond nodes to test in browser. Also I removed the hardcoded == from the html node since base64 will auto add that