Get Product description HTML in Flow

Get Product Description HTML

My flow adds product descriptions to an order metafield on order creation, but it’s only capturing list items as plain text instead of HTML.

Current output:

Great product features: First feature Second feature

Desired output:

<p>Great product features:</p>
<ul>
  <li>First feature</li>
  <li>Second feature</li>
</ul>

How can I preserve the HTML formatting (especially for lists) when saving to the metafield?

One quick thought, is the metafield type able to accept HTML?

1 Like

If I could suggest an alternative approach, you could probably look up the description from the storefront api whenever you need them. That will be formatted for you and not rate limited so safe to call from wherever you need them

It’s JSON, so I should hope to be able to fit any data there.
As a workaround, I added ‘|’ characters to each item in my list and then used that to detect and split stuff in to new lines.
The entire thing was to be able to use Product Description in Packing slips since product data isn’t accessible in slips.
So now I use flow to see if the description has | and if it does, transform it into an array.
Which works for now coz I only have the list and no other text content.