Hi everyone,
I’m working on automating product creation in Shopify through Make, using data from Airtable. Adding products works fine, but I’m struggling to update the Shopify metafields with the corresponding Airtable values.
I’ve already created the metafields in Shopify with the correct types and namespaces. In Make, I retrieve the data from Airtable and want to make sure these values get properly applied to the right metafields on the product.
Has anyone done this before? How do you reliably send this data to Shopify? Should I use multiple modules or can it be done in a single step? Any tips on structuring the scenario would be really appreciated.
QUERY:
mutation metafieldsSet($input: MetafieldsSetInput!) {
metafieldsSet(input: $input) {
metafields {
id
key
value
namespace
}
userErrors {
field
message
}
}
}
VARIABLE:
{
“input”: {
“ownerId”: “gid://shopify/Product/{{2.id}}”,
“metafields”: [
{
“namespace”: “custom”,
“key”: “shelf_life”,
“type”: “single_line_text_field”,
“value”: “{{14.Shelf Life
}}”
}
]
}
}
As for now I try only with one metafield, but I am looking to add between 20-30 metafields.
Thanks in advance for your help!