Need Help Importing <ul><li>...</li></ul> into Rich Text Metafields (JSON Format)

Hi everyone,

I’m currently struggling with importing HTML

content into Shopify using Matrixify, specifically into a Rich Text Metafield.

According to Matrixify support, Shopify requires this to be formatted in JSON, as Shopify’s Rich Text metafields only accept structured content, not raw HTML. Unfortunately, multi-line text is not an option for my use case, as I need to retain rich formatting in a structured and compatible way.

I’ve tried importing it directly as HTML, but the import fails. I’ve been told to manually create a metafield entry in Shopify and export it to learn the structure—but surely there must be documentation or community guidance on how to format things like

    and
  • properly in Shopify’s Rich Text JSON?

    If anyone has successfully imported structured list content into a Rich Text metafield—or has a sample JSON structure for Shopify that includes bullet lists—I’d really appreciate your input!

    Thanks so much in advance :folded_hands:

Hey @Ecomhacker could you please provide me the code so that I convert it into JSON format for you.

Thanks

Hi @TheScriptFlow , here is just one of dozens:

- löst ganz sanft und verletzungsfrei Krusten und Schorf auf der Pferdehaut
- sehr schnelle und effektive Unterstützung für das Entfernen von Maukekrusten
- die hochwertigen Inhaltsstoffe in Pharmaqualität unterstützen eine schnelle Hautregeneration
- Copaiba-, Moringa-, Andiroba- und Neemöl pflegen die neu gebildete Haut und unterstützen ihre Widerstandsfähigkeit

Hi @Ecomhacker ,

The JSON format for the richtext metafields is a pain, it’s not documented anywhere, even just the JSON schema isn’t available. I think part of the problem is that HTML is far more flexible than the richtext format so there’s no defined way to handle cases where you have HTML that wouldn’t be valid in the rich text format.

If you need to import the data from HTML you could try one of two things:

  1. There are a few scripts floating on the internet that try to do this conversion from HTML → JSON. You could use those to reformat the data in your spreadsheet and then update the metafields that way
  2. Use our Ablestar Bulk Product Editor app to update the data, either by copying the HTML into the app or by using a spreadsheet

Here’s a 2-minute video showing how you can bulk edit the rich text metafield, either through the app or with a spreadsheet:

As I mentioned above, the conversion from HTML → JSON involves a bit of guesswork but we’ve been refining it over the last few years and should be able to handle most use-cases. If you do run into an issue you can always undo the changes in the app with a click and reach out and we’ll take a look.

Best,

Daniel