How to Update a Shopify Metafield List of Metaobject References with a New Entry Using Shopify Flow?

Hi guys, i am trying to setup a Flow that has the Metaobject Entry Created , then update a shop metafield value, which is a list of metaobject references , and add this new entry to the list… Can you help me how to achieve that?

Personally, I’d use run code because you can injest the list of metaobjects and easily add another item.

The workflow might look like:

  • Metaobject entry created
  • Run code (with original metafield + metaobject ID), outputs a string that is the list of metaobjects
  • Update shop metafield (with the string variable like {{ runCode.theString }}

Hi @paul_n ! yes, that might be a better solution for this! The final use case for this approach is very specific, i would like to read each metaobject entry (from shop metafield list) from a Shopify Function - however, i think I can only get an array of metaobjetcs ids from the run.graphql - i wasnt able to get their values

Ah, you may be blocked by Functions then because I think they don’t support metaobjects yet. You could instead serialize the data to a string and make the metafield a list of strings?

Yes, that might be the case, actually, maybe JSONvalue and keep the metafield a JSON value instead of metaobject refs… however, each metaobject can be quite long… so, i am not sure LOL