How to automatically asign category metafields/objects to products?

Topic summary

Main issue: link the category metaobject/metafield for “colour” to the product variant “colour” so Shopify renders color swatches on product pages.

Work done: Hex color codes were uploaded via Matrixify and a new product option/variant named “color” was created and assigned across products.

Challenge: Shopify needs the category metafield/metaobject to be explicitly connected to the product option. Bulk Edit can change category and metafields at scale, but does not provide a clear automated linkage for this specific metaobject-to-option mapping.

Suggested approach: Use Shopify’s GraphQL API to programmatically configure metafield‑linked product options (reference: “Metafield-linked product options” docs). GraphQL is Shopify’s query language/API for making bulk, scripted changes.

Outcome: No automated solution was found by participants. The task was completed manually for 2,645 products.

Status: Automation remains unresolved/unclear. Further investigation into a GraphQL-based workflow may be required.

Notes: Screenshots illustrate the assigned color option and the category metaobject settings that need linkage.

Summarized with AI on December 16. AI used: gpt-5.

Hi Olaf2, did you get anything to work? I hav ethe same issue.