How to Use Shopify Flow to Update Option Name?

Topic summary

The discussion explores using Shopify Flow to programmatically update product option names when new products are added to a store.

Initial Challenge:

  • User wants to trigger a flow when products are added, check tags, loop through product options, and rename specific options (e.g., from X to Y)
  • Standard Flow actions don’t directly support updating option names

Solution Approach:

  • Use the “Send Admin API request” action with the productVariantUpdate GraphQL mutation
  • This allows direct API calls to modify variant properties

Current Status:

  • The original productVariantUpdate mutation has been deprecated
  • Recommended replacement: productVariantsBulkUpdate mutation (as of 2024-04 API version)
  • Both mutations remain functional for this use case

Specific Use Case:

  • Appending text to variant names based on metafield values (e.g., changing “M” to “M (not active)” when metafield XYZ = TRUE)

Suggested Workflow:

  • Test the flow logic first using “Log output” action to verify conditions
  • Once conditions work correctly, implement the variant update mutation
  • Community support available for troubleshooting
Summarized with AI on November 1. AI used: claude-sonnet-4-5-20250929.

Is it possible? I see that I can do a for each loop to retrieve the product options…I see I can check if the option name is equal to X…but I don’t see of a way to actually update the option’s name.

The trigger for this would be when a new product is added to the store, check which product it is through a tag, if it is the correct product, do a for each loop to get all product options, check if one of the product options is named X, then if so change it to Y.

There is a new action called Send Admin API request that allows this. Specially, choose productVariantUpdate. Docs for that API call here: https://shopify.dev/docs/api/admin-graphql/2024-01/mutations/productVariantUpdate

This solution seems to not work anymore, is there a substitution?

In my flow, I want to use Product Variant Added, do if statement, if has metafield XYZ = TRUE, I would like to change (or append) size variant name so it’s not “M”, but instead “M (not active)”. This should be possible with Send Admin API, right? Could you help with an example of how to achieve this?

The mutation is deprecated in favor of https://shopify.dev/docs/api/admin-graphql/2024-04/mutations/productVariantsBulkUpdate, but it’s still possible using either mutation.

I don’t have an example handy for you. I’d recommend trying it first without updating an variant but using “Log output” as the action. Once you have the condition right, try out the updating variant part. Post back here if you get stuck