Help needed: Uploading image from OpenAI to Microfeed cms

Hi everyone,

I’m trying to upload an image generated by OpenAI to microfeed using n8n.
The problem is that OpenAI returns the image as binary data, but microfeed requires a URL for the image.

Output from OpenAI

Input Required for microfeed API

Post using HTTP node

{
  "title": "Test Image",
  "status": "published",
  "attachment": {
    "category": "image",
    "url": "???",
    "mime_type": "image/png",
  }
}

I’m stuck trying to figure out how to convert or host the binary image so that I can pass a valid URL to microfeed.

Any ideas or guidance would be really appreciated!

Thanks in advance :pray:

Information on your n8n setup

  • n8n version: 1.88
  • Running n8n via n8n cloud,
1 Like

Hi @stevie,

I use a code node to update the file name. It works when sending the image via email. Should also work for your upload.

Best,

Robert

1 Like

Thank you rbreeb!

1 Like

@stevie glad to help!

If you can please mark the answer as the solution so others can benifit from it.

Best,

Robert

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.