Troubleshooting May 2026 7 min read

Why Shopify Flow Date Comparisons Break (and What to Do Instead)

If you've spent an afternoon trying to make Shopify Flow compare a metafield date to today's date and kept hitting walls, you're not doing it wrong. Flow genuinely can't do this cleanly — and the reasons why are worth understanding before you waste more time on workarounds.

The problem, plainly stated

You want to do something simple: check if a product's expiry_date metafield has passed, and if so, draft the product. Or check if today is a product's launch_date and publish it. Seems like a natural fit for Shopify Flow, right?

Except Flow doesn't work that way. There are three separate walls you'll hit, and most merchants hit all three before giving up.

Wall 1: Flow's condition fields don't support Liquid

When you build a Flow condition, you're comparing a value against a fixed string. You can say "product tag equals on-sale" or "product status equals Active." What you can't do is say "product metafield date is less than today" — because "today" isn't a fixed value you can type in a condition field. It changes every day.

Flow does support Liquid in action fields (like the text of an email), but not in condition fields. So you can't write {{ "now" | date: "%Y-%m-%d" }} as a condition value and have Flow evaluate it. It'll just treat it as a literal string.

This catches a lot of people out, because Liquid works elsewhere in Shopify. It's a reasonable assumption that it'd work here too. It doesn't.

Wall 2: You can't query products by metafield date via the API

Flow's scheduled triggers work by querying a list of products. But the Shopify API doesn't support filtering products by metafield date values — you can't say "give me all products where custom.expiry_date is before today." The API supports filtering by product status, title, tags, vendor, and a few other fields. Metafield date comparison isn't one of them.

This means any scheduled Flow that tries to process "products with a past expiry date" has to fetch all your products and filter them in code. Which brings us to wall 3.

Wall 3: The Run Code workaround is fragile

There is a workaround. Shopify Flow has a "Run Code" action that lets you write JavaScript to process data. With enough effort, you can build a flow that fetches all products, converts metafield date strings to Unix timestamps, compares them to the current time, and takes action on matches.

It works. But it's not simple. You're writing and maintaining custom JavaScript inside a Flow automation. You need to handle pagination if your catalogue is large. You need to deal with products that don't have the metafield set. If the Shopify API changes something, your code might silently break. And you need a developer to build or modify it.

For merchants who just want a product to auto-archive when it expires, this is a lot.

💡 To be fair to Flow: it's a genuinely powerful tool for order automation, customer segmentation, and inventory management. It's just not designed for scheduled, date-driven product automation — and trying to make it do that job is fighting against the grain of how it's built.

What actually works

DateCue is built specifically for this problem. You set a date in a product metafield — any date or date_time metafield — and DateCue scans your products every minute looking for actions that are due. When a date is reached, it fires the action you configured: change product status, add or remove a tag, or send a staff email.

No Liquid. No JavaScript. No API pagination to worry about. You set it up in a few clicks.

Here's the expiry workflow that would've taken hours to build in Flow:

Metafield: custom.expiry_date
Timing: After the date (0 days)
Action: Change product status → Draft
Filter: Status = Active

That's it. DateCue picks up every product with a custom.expiry_date metafield, tracks the date, and moves it to draft within a minute of the date passing. The Active status filter makes sure it only touches products that are currently live — it won't accidentally re-touch things already in draft.

The same logic works for future dates too

It's not just expiry. The same approach works for launch dates, sale windows, seasonal availability — anything where you need an action to fire at a specific point in time relative to a date you control.

Want to auto-publish a product on its launch date? Set custom.launch_date, configure "On the date → Change status to Active." Want to automatically publish and hide seasonal products? Two workflows on the same metafield, one fires at season start, one fires at season end.

The things that are genuinely difficult in Flow — date math, scheduled queries, metafield comparisons — are exactly what DateCue handles natively.

Do you still need Flow?

Possibly. If you're using Flow for things it's actually good at — tagging orders, sending customer emails after purchase, managing inventory alerts — keep using it. DateCue and Flow don't conflict with each other.

But if you've been trying to build date-based product automation in Flow, or you've already built it and it keeps breaking, DateCue is the cleaner path.

Frequently asked questions

Why can't Shopify Flow compare dates natively?

Flow's condition system is designed for simple value comparisons — it evaluates conditions at the moment a trigger fires, not on a schedule. Date math (comparing a stored date to "today") requires dynamic evaluation that Flow's condition fields don't support. Liquid works in Flow action fields, but not condition fields.

Is the Run Code workaround in Flow actually reliable?

It can be, but it requires ongoing maintenance. You need to handle edge cases like missing metafields, large catalogues with pagination, and API changes. It's viable for a developer who's comfortable maintaining JavaScript inside a Flow automation — but it's overbuilt for what most merchants need.

Do I still need Shopify Flow if I use DateCue?

DateCue replaces Flow specifically for date-triggered product automation. If you're using Flow for other things (order workflows, customer journeys), you can keep it — the two tools don't conflict. DateCue just handles the date-based product piece that Flow struggles with.

What metafield types does DateCue support?

DateCue works with both date and date_time metafield types on Shopify products. You can use any metafield namespace and key — it doesn't have to be custom. If you can see it in the Shopify admin's metafield editor, DateCue can watch it.

Ready to skip the Flow workarounds?

DateCue handles date-based product automation natively — no code, no maintenance, no midnight launches.

Start your free trial

14-day free trial. No credit card required.