Shopify Flow: Mastering Product Automation & Tagging (Community Insights)
Automating Product Management with Shopify Flow: A Community Deep Dive
Hey everyone! Been digging through the Shopify Community forums lately, and I stumbled upon a really interesting thread about using Shopify Flow to automate product management, specifically around tagging and handling large product lists. It seems like a lot of store owners are looking for ways to streamline these processes, so I thought I'd share some of the insights I gathered.
The Challenge: Getting a List of Products and Modifying Them
The original poster, sebas07, was trying to figure out how to retrieve a list of products – either a specific product or the entire catalog – and then automatically update the product's tags based on some metafield data. This is a common scenario, especially when you're dealing with a large inventory and need to keep things organized.
Solution 1: Looping Through Products with "Get Product Data"
tim_1 offered a solid starting point: using the "Get product data" action in Shopify Flow. This action lets you retrieve a list of products that match certain criteria. Then, you can use the "Loop" action to iterate through each product in the list and perform actions on them, like updating tags or other properties.
The key thing to remember here is the 100-object limit. As tim_1 pointed out, the "Get..." actions in Flow are capped at 100 items. So, if you have more than 100 products, you'll need to get creative with your filtering and scheduling. Maybe tag products in batches or use a scheduled trigger to run the flow multiple times with different filters.
Solution 2: Unleashing the Power of Flow Companion and GraphQL
Mivicle jumped in with a more advanced solution using the Flow Companion app. This app unlocks some really powerful features, including the ability to bypass the 100-item limit with the Start custom workflow for list of product action. This is a game-changer if you're dealing with a large catalog!
Mivicle also tackled the issue of using Liquid variables in the "Add product tags" action. Turns out, it's not directly supported. The workaround? GraphQL! By using the Execute GraphQL request action from Flow Companion, you can directly interact with Shopify's data layer and set tags based on Liquid variables. Here's the code Mivicle shared:
mutation addTags($id: ID!, $tags: String!) {
tagsAdd(id: $id, tags: $tags) {
node {
id
}
userErrors {
message
}
}
}
And the variables:
{
"id": "{{product.id}}",
"tags": "{{product.familiaWeb.value}}, {{product.modeloReal.value}}"
}
Mivicle even provided a detailed workflow example:
-
The first workflow starts on a schedule and runs the
Start custom workflow for list of productsaction for all active products. You can specify a narrower condition in theQueryfield if needed. In theSpecifierfield, you can use any value - in my example, I’ll useset tags -
The second workflow starts with the
Product: custom trigger triggeredtrigger, checks that theSpecifierequalsset tags, and adds tags from metafield values if the metafields are not empty.
Actionable Instructions: Combining the Solutions
Alright, so how can you actually use this information to solve your own product tagging challenges? Here's a combined approach based on the community discussion:
- Install Flow Companion: Get the Flow Companion app from the Shopify App Store. This will give you access to the advanced actions and triggers you need.
- Create a Scheduled Workflow: Set up a workflow that runs on a schedule (e.g., daily, weekly).
- Use "Start custom workflow for list of product": Use the Flow Companion's action to retrieve your list of products. If you need to process only a subset, use the "Query" field to filter products based on specific criteria.
- Create a Second Workflow with a Custom Trigger: Create a second workflow that is triggered by the "Product: custom trigger triggered" trigger (again, from Flow Companion). Make sure the "Specifier" matches the value you used in the first workflow (e.g., "set tags").
- Add GraphQL Action: Inside the second workflow, use the "Execute GraphQL request" action to update the product tags based on your metafield values. Use the code snippets provided by Mivicle, adapting them to your specific metafield names.
Addressing sebas07's Specific Issue
sebas07 also shared a screenshot of their Flow setup, which is helpful for understanding the context. He was trying to retrieve the familia_web and modelo_real metafields and insert them into the product's labels field. The GraphQL approach outlined above is definitely the way to go here. Make sure your GraphQL query is correctly referencing the metafields and that the Liquid variables are properly formatted.


So, there you have it! A comprehensive look at how to use Shopify Flow to automate product tagging and handle large product lists, all thanks to the helpful folks in the Shopify Community. The combination of built-in Flow actions, the Flow Companion app, and GraphQL opens up a ton of possibilities. Remember to consider the 100-item limit and explore the Flow Companion app for larger catalogs. Good luck automating!

