Insert Multiple Images into Shopify Blog Article



Hi Community!

first of all, thanks to all for the great solutions posted here. This community has made my life so much easier to many times!

Now I am struggling with a problem that I have not found on here yet (sorry if I missed it).

I am building a workflow combining relevance AI and a few DALL-E nodes to create blog articles and related images.

The workflow works fine, except for adding images throughout the article under every h2 headline.

When I am inserting the urls generated by the DALL-E node, the article gets posted and it works for one day, but then the images disappear (assume that it’s a temporary url).

Now I am trying to post the images by using the HTTP get file node. That works, but only for the title image. As soon as I try inserting the image into the html body, I am getting an error:

BundleValidationError

Validation failed for 1 parameter(s).

  • Buffer can’t be converted to text for parameter ‘body_html’.

I would appreciate any tips how to directly upload the images in the blog article or upload it to the shopify files section to get a url that I can insert in the article.

Thanks so much!
Lars

Hi @Lars_Jansen
You post the image data instead of the HTML code into the Body HTML field. I would suggest extending your workflow, uploading the downloaded file to a hosting, getting the file public URL, and adding to an HTML code dynamically.

Thanks @ponvaskon .

Do you know if there is a way to

  1. upload the file directly to the shopify files API? I would like to avoid hosting with a public url.
  2. Convert the file into any other format that I can insert as html?

Cheers!

@Lars_Jansen

  1. please check this article.
  2. the file URL should be a part of the HTML body. You can ask AI to generate the required HTML structure and add your uploaded file URL.
1 Like

In case anyone comes across a similar problem: I was able to solve it with two graphQL api calls.

  1. Create image with fileCreate mutation
    the url referenced here in “54 Data” is the output url from the DALL-E image creation.

  2. fetch image url from GID reated in previous node

3 Likes