What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Re:

bulk uploading product media

TorqIT-Dev
Shopify Partner
1 0 0

trying to run the following query: 

mutation {
  bulkOperationRunMutation(
    mutation: "mutation call($media: [CreateMediaInput!]!, $productId: ID!) {  productCreateMedia(media: $media, productId: $productId) {    media {      alt      mediaContentType      status    }    mediaUserErrors {      field      message    }    product {      id      title    }  }}"
    stagedUploadPath: "xxxxx"
  ) {
    bulkOperation {
      id
      url
      status
    }
    userErrors {
      message
      field
    }
  }
}

results in the error: 

"Please Pass A Whitelisted Mutation Name"

 

after searching around I found examples of others needing to reach out to support to get their mutation enabled for bulk operations. Can someone confirm productCreateMedia mutation can be run in bulk? 

Replies 8 (8)

ShopifyDevSup
Shopify Staff
1453 238 525

Hi @TorqIT-Dev,

 

You are correct - the mutation you are trying to run does not fall on the allow list for Bulk Operations which is generating this error message. You can find more on the calls you can perform on this list from our developer documents. 

 

We've also submitted feedback to our developer teams to alter the messaging to be more user friendly to identify.

 

Hope that helps! 

 

Thanks

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

DaveBitton
Shopify Partner
11 0 1

OK, but, is there any way to bulk load ExternalMedia? I need to add one to a set of Products each. I also need to run productReorderMedia to make the ExternalMedia the first asset. Can I import a CSV w/ URLs? I know that Matrixify does not support video Media. So, what do we do?

Maris
Shopify Partner
319 5 75

BTW - Matrixify will support Product Media soon, we are working on that now.

It's going to be a large and painful change (also for Merchants), because we switch to the new Media GraphQL API that will make work with Product Media slower, but on the benefit side - you will be able to export and import all the supported Media types.

 

Should be live any week now... 🤞

Matrixify (Excelify) | Bulk Import Export Update Migrate | https://matrixify.app
MohitT
Shopify Partner
3 0 1

@Marisis it live or any ETA? When can we use this feature to bulk import products with images using GraphQL API?

Maris
Shopify Partner
319 5 75

Hello, @MohitT !
Sorry for forgetting about this thread - yes, it's live now.

You can Export & Import all the media types as in Admin:

  • Images: JPG, PNG, GIF, HEIC, WEBP, SVG
  • Animated images: GIF (animated gif), PNG (apng)
  • Video: MP4, MOV, WEBM
  • 3D models: GLB, USDZ
  • External video: from YouTube and Vimeo.
Read more about the supported Media for Products:
https://matrixify.app/documentation/products/#ColumnsAvailableForExportAndImport-Media

Also there is a new export-only column "Image Type" that tells what is the type of that "image".
 
Existing column names don't change, they remain as Image Src (etc) - to keep the compatibility with existing template files that you are used to.
 
Notice that export will become slower because of that because to get all the media, we need to make additional Shopify API calls.
Matrixify (Excelify) | Bulk Import Export Update Migrate | https://matrixify.app
MohitT
Shopify Partner
3 0 1

@Maris Do you know how we can bulk import products using bulkOperationRunMutation: productCreate? When I pass CreateMediaInput it gets error "

Bulk mutations cannot contain more than 1 connection."
Maris
Shopify Partner
319 5 75

Sorry, @MohitT - we are not using the bulkOperations API in Matrixify, have played with it long time ago, but it is too limiting for us, so are not taking that route. That error sounds like that very reason, because if I remember correctly - it can work with just 1 nested level of related data. 🤔

Matrixify (Excelify) | Bulk Import Export Update Migrate | https://matrixify.app

MohitT
Shopify Partner
3 0 1

@TorqIT-DevAre you able to make productCreateMedia request for bulk operation?