Workflow to assign product template based on product type

Topic summary

Automating assignment of a product’s theme template based on product type in Shopify Flow.

Proposed API approach: Use the “product added to store” trigger and the Flow action “Send HTTP request” to call Shopify’s Admin GraphQL mutation productUpdate to set the product’s template_suffix (the theme template identifier). Requires a custom app private API key and specific headers; recommended to validate the request in Postman first. No native Flow action exists for this yet; developer assistance may be needed.

Alternative workaround: Tag-based automation with Airtable/Whalesync. When a product goes out of stock, Flow removes a tag and adds an “Archive” tag; Airtable automation detects the tag change, sets the theme template to “archive-products,” and updates the product in Shopify. Initially tested successfully on 4 items; later confirmed to work as expected. An image illustrates the Airtable setup.

Status: The original requester sought examples and guidance and did not confirm a resolution. Another participant asked for outcomes. The Airtable-based method is confirmed working; the API method is viable but requires setup. Discussion remains open for a native Flow action.

Summarized with AI on January 6. AI used: gpt-5.

I am relatively new to using Shopify Flow and perhaps I have missed something but it seems that there is no way to automatically assign a specific product template to products with a specific product type. Has anyone figured out how to use Flow to assign, for example, a product.widget template to products with product.productType=widget or a product.dohickey template to products with product.productType=dohickey?

I’m guessing you mean the theme template for the product. You could use “product added to store” for the trigger and “Send http request” to call Shopify’s API to change the “template suffix”.

https://shopify.dev/docs/api/admin-graphql/2023-01/mutations/productUpdate

1 Like

Hi Paul_n

Thanks for the suggestion. I understand how to add the trigger and the condition(s) and how to select the action to be “Send HTTP request”. However, once I am presented with the fields for the HTTP request, I am, unfortunately, at a loss. The URL you provided leads to information which I am sure is clear to developers, but not to me. Are there any examples of Flows that are using the action “Send HTTP request” and the Shopify GraphQL Admin API (I believe that is the API you were referring to), that I may use to try and amend and trigger on a test product, until I get the desired results? Thanks for any further assistance you may be able to provide.

You need a custom app private API key. The headers you use are in this post:

https://community.shopify.com/post/1913637

Usually, I would test this first using something like Postman make sure the API request works.

If this is beyond your abilities, you may need to reach out to a developer/partner to help until Flow has a dedicate action for something like this

1 Like

Hey @dalestreet I think I figured out how to do this myself. Different spin on what @paul_n said below.

I am currently testing whalesync and airtable in a test environment for a client that sells one of a kind collectible items. They want to archive them but have them visible for customers to see the past products they have sold.

Steps taken:

  1. Create a shopify flow that when a product goes out of stock that meets certain conditions you then remove the product tag (as I am using that to keep it in a specific collection).

  2. I have it then add a product tag called Archive.

  3. In airtable, I have an automation pick it up where if the Tag was updaed to Archived add my Theme Template name of archive-products. It then goes ahead and updates shopify for the product and loads it.

I need to test this a little more to confirm if it 100% works but so far it has worked on 4 items I have tested it with.

1 Like

Hi @dalestreet : Did you solve the issue? We would love to do the same but so far our attempts failed. Any insight highly appreciated!

Hey Tokitz, sorry for the delay I can confirm this works as expected. Happy to help if you would like to shoot me a message or email jared@maximusdigital.co