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.

Thanks in advance for your help!

Hi @GULF_ORGANIC_FOOD,

sadly, I have not done this specifically. Would you be able to share some screenshots of what you are doing?
If the “Create a Product” does not offer inputs for the meta fields maybe the update a product does?

Best,
Richard

Hi @Richard_Johannes Thank you for your reply !

Here is what I’ve done so far:


The scenario works ( No error ), but nothing happens in Shopify.
I need about 15-20 metafields, but as for now I try with only metafield.

Thanks again !

Thibaud

Thank you for the screenshot of the input! Seems generally not bad and I’d also try it with one attribute before going for 20! :smiley:

Any chance you can share the output of the module after it ran? I think maybe the output contains information because it should return “userErrors”.

My approach here would be to remove the variables completely and insert static values so you are certain about the exact input.

Hello,

Thank you for your reply !
Here is the screenshot (not sure to understand everything lol):

This is for a food store, we need nutritional values ( which change on every product ), that is why I need to get variable ( i believe ? ).

I am a beginner, thank you for your help :slight_smile:

Hi @GULF_ORGANIC_FOOD,

thank you for the screenshot. We’re almost at the interesting part! :smiley:
The screenshot seems to be very bad quality when I download it but there is a part “errors” at the top (not the headers) - this is the actually interesting part! I hope to see some kind of message on what’s going wrong! :slight_smile:
Best,
Richard

Oups sorry !

Here it is:
Output

  • Bundle 1Collection

    • BodyCollection

      • errorsArray

        • 1Collection

          • message

Field ‘metafieldsSet’ is missing required arguments: metafields

    * locations<small>Array</small>

      * 1<small>Collection</small>

    * path<small>Array</small>

    * extensions<small>Collection</small>
  * 2<small>Collection</small>

    * message

Field ‘metafieldsSet’ doesn’t accept argument ‘input’

    * locations<small>Array</small>

    * path<small>Array</small>

    * extensions<small>Collection</small>
  * 3<small>Collection</small>

    * message

Variable $input is declared by metafieldsSet but not used

    * locations<small>Array</small>

    * path<small>Array</small>

    * extensions<small>Collectio</small>

Again thank you !!!

Hello @Richard_Johannes,

Did you have the time to check this ? Thank you :slight_smile:

Best,
Thibaud

Hi @GULF_ORGANIC_FOOD,

I’m sorry, I didn’t see your response.
I honestly don’t know the answer, I’d need to setup a test Shopify account. Have you tried asking AI because I feel like the issue is the API request.

Gemini tells me:

mutation metafieldsSet($ownerId: ID!, $metafields: [MetafieldsSetInput!]!) {
  metafieldsSet(owner: $ownerId, metafields: $metafields) {
    metafields {
      id
      key
      namespace
      value
    }
    userErrors {
      field
      message
    }
  }
}
{
  "ownerId": "gid://shopify/Product/{{2. Product ID}}",
  "metafields": [
    {
      "namespace": "custom",
      "key": "shelf_life",
      "type": "single_line_text_field",
      "value": "{{38.Shelf Life}}"
    }
  ]
}

Sadly, this can be complete shit but as I don’t have a Shopify account, it’s hard for me to test.
My approach here would be to leave out the variables and try to update one single metafielcd for one single product and once you’ve got that one sorted, you can go the dynamic route!