Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
I have a collection of products that are on sale. Right now, those products are manually tagged with a product tag "On Sale".
Instead of manually tagging the products, I would like to create a flow where products are tagged automatically whenever they are updated. Shopify's help bot seems to think this is possible but the steps it provides do not seem to exist.
Here's what it told me to do -
Sure thing! Here's a step-by-step guide to create a workflow to tag products when the sale price is lower than the compare price:
Does anyone know how to make this work?
That action doesn't exist in Flow, correct. Product updates can be very frequent, like on every inventory change. What change do you need in order to set that tag?
You can use this pattern:
Thanks for the response. You are right about the frequency of product updates. However in this case I don't mind if it takes a few hours for the products to be labeled (and ultimately show up in the On Sale collection on the website).
In this case, the criteria that I care about are -
Could you or anyone that's familiar with Flow syntax help with the remaining code needed to make this work? The problem is I don't see how to write the logic to compare the two prices. Here's what I have so far in pseudo-code (screenshot attached shows actual code)
P.S. The red arrow indicates were the logic problem is.
To add tags, you'll need to use a For Each step right after "Get product data". That will change your condition slightly (simplifies it a bit). Once you do that, I think you'll be able to select the correct variable (right now it's a list, so doesn't show up).
I'm still struggling to get this to work. I've run a number of tests and regardless of what I try, no tags are added or removed.
Two potential issues I see are that some of our products have variants while most do not and compare-at price is usually only filled in when a product goes on sale. For most products, compare-at price is blank.
I've tried to address the latter by including the first condition 'exists' but I haven't been able to find anything that talks about what 'exists' means. If a no value is entered in the compare-at price, is this field null? If a product doesn't have any variants, what am I comparing (if anything) with the current logic?
I'm also wondering if these conditions are comparing the exact same item in the array (or list as it's called in the flow), or is it looking for any item to meet the first condition, and then any other item to meet the second?
Here's where I'm at right now -
For your first condition, you should be using the specific item and not "Get product data". You are checking if any of the products returned has that amount.
Hi, Do you mind sharing a screenshot of the final flow? I'm trying to set up the same thing and struggling to make it work on my end. Thank you!
I don't think a screenshot is going to help much. What part are you stuck on?
II
I'm new to creating flows... what am I doing wrong?
Here's a screenshot, hope it helps. When setting up the conditions, make sure you're working with the returned data. Also, be aware that testing your flow can be challenging. You'll want to email yourself the products that are being returned in the array because sometimes a recently edited product would be included in the array and other times it would not.
Thanks! This helped get me further. I replied to Paul with a screenshot of where I'm at so hopefully he can help.
For "Get product data" you can only get 100 at a time. If there are more than 100 updates per hour, you need to filter it further via the query, run it more often, or it's not going to work. It can run up to every 10 minutes.
Regarding the condition, you need to try to build the condition and submit a more specific request. Your summary in the screenshot isn't detailed enough.
Do you have any advice on building the condition? I tried exactly what Speakunique posted, what I posted, and several iterations, and can't get it to work.
I will run the query more frequently, but for now just trying to get the rest to work. I do have some products currently in the last 100 updated that should have been tagged, but were not.
P.S. Speakunique - sorry for hijacking your threat and causing you to get alerts 😬
I think we just got it worked out : )
That's awesome @Newbie10. You should share what you changed to help out the next person. 🙂
It's mostly working now, but still needs a few tweaks. I will for sure share once we are confident it's worked out.
Hi Paul, can you tell me the proper way to change the "updated_at" timeframe to minutes? We tried replacing "1 hour" with "15 minutes" and ".25 hour" but neither returned the results we were expecting.
updated_at:<='{{ scheduledAt }}' AND updated_at:>'{{ scheduledAt | date_minus: "1 hour" }}'
"15 minutes" should work.
How do i fill out this section - i cant seem to find a way to get it to check for those things in my flow -
It's the exact same logic that was used as the conditions in the "For" loop but this time you want to use the values that were returned in the array.
So it should look like this? - Also if i wanted to do this on specific products for example on categories or products with a specific tag - how would i go about that? Lets say i want it to check on products with the tag - T-shirts?
So that it would be > check products > check if has tag t-shirts > check if on sale (compare price thingy) and then add - on sale tag if on sale, and remove on sale tag if not on sale
Hello everyone,
It looks like some of you have a solution for this. Would any of you be so kind as to upload it here? I think many of us would appreciate it a lot.
Thanks a lot
HI All,
I'm wanting to check back in on this thread. I've created a flow but wanting to see if anyone has any input on if it will work properly.
- this needs to check all our products (over 10,000) and add/remove the tagging accordingly.
- Should I have it look at a collection that has all the products and how would that change the flow?
Thanks for the help.
Not enough detail because what's in the action configuration matters (esp. the conditions and "Get product data").
The rough structure looks OK for setting tags but it's unclear how its going to run on all your products ("Get" has a limit of 100 at a time and you have it scheduled to run once a day).
If you want to test your condition logic, I would start by removing the tag actions and using "Log output" instead. Then run it to verify the paths are followed as you expect.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025