Flow treats JSON metafields as strings - can't access individual properties

Hi Paul & Flow team!

I’m saving a JSON-type metafield on orders, with a metafield definition that includes a JSON schema. However, when I try to reference this metafield as a variable in Flow, it’s treated as a string rather than a JSON object. I’ve attached a video showing the issue.

For example, in order notifications templates, I can access individual JSON properties like this:

{{ metafields.atlas_pickup_points.point.code }}

I’d love to be able to do the same in Flow - reference specific properties of a JSON metafield, rather than having to work with the entire value as a raw string. Is this something Flow supports or could support?

Thanks!

Can use a “Run code” action to parse the JSON string and extract the data needed.

Run code is definitely the solution here. I think using the schema in Flow to type the data would be too brittle of a setup, as you can change that schema at any time, but a workflow might already be live.