Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Is there any way (using Flow app) to modify the "Product Type" field for an item based on the tags on that item? For example, an imported item has the tag Patriotic, but the incorrect Product Type of Mom. Can I use flow to change the product type, or can it only be done via the CSV or manually either on the product page or on the bulk edit page?
Thanks!
Solved! Go to the solution
This is an accepted solution.
Yes, look at the new action called "Send Admin API request". You'll be able to call "productUpdate" to set the type.
This is an accepted solution.
Yes, look at the new action called "Send Admin API request". You'll be able to call "productUpdate" to set the type.
Hi There,
Could you please expand upon this please. I have been racking my head trying to get the Product Type to change based on the Tag and I for the life of me cannot figure it out.
Many thanks!
Best, Michael
You haven't provided much detail about what you are trying to do.
This is one way to check a tag and then set a product type based on that check.
This was exactly what I needed! Thank you so much!
Best, Michael
Hi Paul_n
I was trying to follow this great explanation about updating de Product Type (finally I see a way to do this!), but I'm getting an error.
I need to change the Product Type based on a Product Tag.
I tried like you showed in the image (in two ways, I was not sure if it was missing a "}"):
But I always get this error:
Exception: { "input": { "productType": "Smartphones", "id": "gid://shopify/Product/14950198608247", }
Mutation input evaluated to invalid JSON. Please ensure the input forms valid JSON after Liquid code is run.
Input
{
"mutation_name": "productUpdate",
"mutation_input": "{\n \"input\": {\n \"productType\": \"Smartphones\",\n \"id\": \"gid://shopify/Product/14950198608247\",\n \n}",
"api_version": "2024-07",
"hydration_type_patch": "{}"
}
Can you help, please? I'm doing something wrong? Can be the case that the way my website code is customized makes me to have the script in a different way?
Two more things:
. To change the Vendor is the same way?
. I need to change the Title too, but no all the Title. I need to replace a string in the Title for another string (exp: "Outlet Store1" for "Outlet Store2"). It's possible to do this too? If so, can you show how can be the script, please?
Thank you very very much in advance for any help that you can give. 🙂
Bes regards.
You have invalid JSON. I think it's the trailing comma after your "id" field. Usually you can just add your code to something like:
And it will show you the problem.
Great! The comma was the problem indeed. Works fine now for Type and Vendor. Thanks!
{
"input": {
"customProductType": "Smartphones",
"vendor": "Apple",
"id": "{{ product.id }}"
}
}
And to replace a specific string for another string in the Title, any idea?
I think I have to stringify and parse, but I'm not getting how to associate that with the code for the Title in Flow...
{
"input": {
"customProductType": "Smartphones",
"vendor": "Apple rst",
"title": "",
"id": "{{ product.id }}"
}
}
Do you know how to do it?
Thank you very much again for your time!
OK, I found a way! I'll let it here if someone needs:
{
"input": {
"customProductType": "Smartphones",
"vendor": "Apple",
"title": "{{ product.title | replace: 'Title String 1', 'Title String 2' }}",
"id": "{{ product.id }}"
}
}
Thanks!
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025