How to update Shopify metafields via Make using Airtable data?

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!

1 Like

Hey @user132.

I’m not too familiar with MAKE so hopefully some other members of the community will chime in to help!

I’m happy to help on the Shopify/Graphql side of things. Have you tested the mutation above in an API client to confirm that the structure itself is working as expected. That could help ensure that at minimum the mutation you are setting up in MAKE is expected to work.