Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hello, I want to automate the Katecorgi metafields by writing a product description, and then I want the system to extract the values for the metafields from the description. I keep geting errors.
It's not clear what you want to do here and why you've left the value field empty when updating a metafield.
I want to write a product description. For example:
Technical details
Glass: Mineral glass
When the system detects the value 'Mineral glass' in the description, I want it to automatically extract that value and place it in the metafield for 'type of glass'.
If it's in the description, you need to do string parsing on the description. It really depends on how consistent your descriptions are, but probably I would use Run code on that as JavaScript has more tools for string parsing then Liquid. But Liquid might work as well.
no image came through your post.
Your metafield is a metaobject reference. You cannot change the values in a metaobject by updating the product metafield. Instead you would need to update the metaobject.
To do that, you would use "Send Admin API request" with the "metaobjectUpdate" mutation. You'll need to set the JSON in that update.
thanks for the help but i still get some errors. I tried with the metaobjectupdate and got this errors "Mutation had errors: "Variable $id of type ID! was provided invalid value", "Variable $metaobject of type MetaobjectUpdateInput! was provided invalid value" {
"query": "mutation metaobjectUpdate($input: MetaobjectUpdateInput!) { metaobjectUpdate(input: $input) { metaobject { id } userErrors { field message } } }",
"variables": {
"input": {
"id": "gid://shopify/Metaobject/170755064149",
"handle": "kristallglas",
"fields": [
{
"key": "typ",
"value": "Kristallglas"
}
],
"capabilities": {
"publishable": {
"status": "ACTIVE"
},
"onlineStore": {
"templateSuffix": ""
}
},
"redirectNewHandle": false
}
}
}
It appears you are including fields that you really don't need to update so it's not clear which field this error is complaining about. Assuming that it's they value field for your metaobject, you need to share more details about your metafield, specifically the types of each field.
hello could you find the problem?
Your key for that field is either "glas" or "glas.glas" not "typ"
As you can see in the SC everything works and i get no errors anymore but value in the metafield does not fills. the code: {
"id": "gid://shopify/Metaobject/170755064149",
"metaobject": {
"handle": "kristallglas",
"fields": [
{
"key": "glas",
"value": "kristallglas"
}
],
"capabilities": {
"publishable": {
"status": "ACTIVE"
}
},
"redirectNewHandle": false
}
}
You aren't updating a product metafield but a metaobject. If you go to "Content" in the Admin you should see what you updated.
So should i set a metafieldsSet mutation or please what should i do? Im useing a categori metafilds for my products
I don't know because it's unclear why you are using a metaobject at all if you just want a description. If that's all you need, then create a product metafield that is multi-line text and use the "Update product metafield" action on it.
I still get error
That error means you had a new line
i think i got it thanks
Using a multi-line text field won't work for me, because I'm using this metafield for filtering products in my store. I've already manually filled in data for over 400 products, so I can't simply switch the metafield type to multi-line text without losing that work. I need to find a sulation for my metaobjets
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025